DWORD ScaleViewportExt(hDC,Xnum,Xdenom,Ynum,Ydenom)
This function modifies the viewport extents relative to the current values. The formulas are written as follows:
xNewVE = (xOldVE ´ Xnum)/ X denom
yNewVE = (yOldVE ´ Ynum) / Ydenom
The new extent is calculated by multiplying the current extents by the given numerator and then dividing by the given denominator.
Parameter | Type/Description |
hDC | HDC Identifies the device context. | |
Xnum | int Specifies the amount by which to multiply the current x-extent. | |
Xdenom | int Specifies the amount by which to divide the current x-extent. | |
Ynum | int Specifies the amount by which to multiply the current y-extent. | |
Ydenom | int Specifies the amount by which to divide the current y-extent. |
The return value specifies the previous viewport extents (in device units). The previous y-extent is in the high-order word; the previous x-extent is in the low-order word.