ScaleViewportExtEx function (wingdi.h)
The ScaleViewportExtEx function modifies the viewport for a device context using the ratios formed by the specified multiplicands and divisors.
Syntax
BOOL ScaleViewportExtEx(
[in] HDC hdc,
[in] int xn,
[in] int dx,
[in] int yn,
[in] int yd,
[out] LPSIZE lpsz
);
Parameters
[in] hdc
A handle to the device context.
[in] xn
The amount by which to multiply the current horizontal extent.
[in] dx
The amount by which to divide the current horizontal extent.
[in] yn
The amount by which to multiply the current vertical extent.
[in] yd
The amount by which to divide the current vertical extent.
[out] lpsz
A pointer to a SIZE structure that receives the previous viewport extents, in device units. If lpSize is NULL, this parameter is not used.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
The viewport extents are modified as follows:
xNewVE = (xOldVE * Xnum) / Xdenom
yNewVE = (yOldVE * Ynum) / Ydenom
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |
See also
Coordinate Space and Transformation Functions