ScaleViewportExtEx

3.1

  BOOL ScaleViewportExtEx(hdc, nXnum, nXdenom, nYnum, nYdenom, lpSize)    
  HDC hdc; /* handle of device context */
  int nXnum; /* amount by which current x-extent is multiplied */
  int nXdenom; /* amount by which current x-extent is divided */
  int nYnum; /* amount by which current y-extent is multiplied */
  int nYdenom; /* amount by which current y-extent is divided */
  SIZE FAR* lpSize; /* address of SIZE structure */

The ScaleViewportExtEx function modifies the viewport extents relative to the current values. The formulas are written as follows:

xNewVE = (xOldVE * Xnum) / Xdenom
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.

Parameters

hdc

Identifies the device context.

nXnum

Specifies the amount by which to multiply the current x-extent.

nXdenom

Specifies the amount by which to divide the current x-extent.

nYnum

Specifies the amount by which to multiply the current y-extent.

nYdenom

Specifies the amount by which to divide the current y-extent.

lpSize

Points to a SIZE structure. The previous viewport extents, in device units, are placed in this structure. If lpSize is NULL, nothing is returned.

Return Value

The return value is nonzero if the function is successful. Otherwise, it is zero.