'\" t .\" Title: drm_rect_calc_hscale_relaxed .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: DRM Core .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "DRM_RECT_CALC_HSCALE" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "DRM Core" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" drm_rect_calc_hscale_relaxed \- calculate the horizontal scaling factor .SH "SYNOPSIS" .HP \w'int\ drm_rect_calc_hscale_relaxed('u .BI "int drm_rect_calc_hscale_relaxed(struct\ drm_rect\ *\ " "src" ", struct\ drm_rect\ *\ " "dst" ", int\ " "min_hscale" ", int\ " "max_hscale" ");" .SH "ARGUMENTS" .PP \fIsrc\fR .RS 4 source window rectangle .RE .PP \fIdst\fR .RS 4 destination window rectangle .RE .PP \fImin_hscale\fR .RS 4 minimum allowed horizontal scaling factor .RE .PP \fImax_hscale\fR .RS 4 maximum allowed horizontal scaling factor .RE .SH "DESCRIPTION" .PP Calculate the horizontal scaling factor as (\fIsrc\fR width) / (\fIdst\fR width)\&. .PP If the calculated scaling factor is below \fImin_vscale\fR, decrease the height of rectangle \fIdst\fR to compensate\&. .PP If the calculated scaling factor is above \fImax_vscale\fR, decrease the height of rectangle \fIsrc\fR to compensate\&. .SH "RETURNS" .PP The horizontal scaling factor\&. .SH "AUTHORS" .PP \fBJesse Barnes\fR <\&jesse.barnes@intel.com\&> .br Intel Corporation, .RS 4 Initial version .RE .PP \fBLaurent Pinchart\fR <\&laurent.pinchart@ideasonboard.com\&> .br Ideas on board SPRL, .RS 4 Driver internals .RE .PP \fBDaniel Vetter\fR <\&daniel.vetter@ffwll.ch\&> .br Intel Corporation, .RS 4 Contributions all over the place .RE .SH "COPYRIGHT" .br