CDC::ScaleViewportExt
TOC
Collapse the table of content
Expand the table of content

CDC::ScaleViewportExt

 

Modifies the viewport extents relative to the current values.


      virtual CSize ScaleViewportExt(
   int xNum,
   int xDenom,
   int yNum,
   int yDenom 
);

xNum

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

xDenom

Specifies the amount by which to divide the result of multiplying the current x-extent by the value of the xNum parameter.

yNum

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

yDenom

Specifies the amount by which to divide the result of multiplying the current y-extent by the value of the yNum parameter.

The previous viewport extents (in device units) as a CSize object.

The formulas are written as follows:

xNewVE = ( xOldVE * xNum ) / xDenom

yNewVE = ( yOldVE * yNum ) / yDenom

The new viewport extents are calculated by multiplying the current extents by the given numerator and then dividing by the given denominator.

Requirements

Header: afxwin.h

Show:
© 2016 Microsoft