ScaleViewportExtEx function

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    Xnum,
  _In_  int    Xdenom,
  _In_  int    Ynum,
  _In_  int    Ydenom,
  _Out_ LPSIZE lpSize
);

Parameters

hdc [in]

A handle to the device context.

Xnum [in]

The amount by which to multiply the current horizontal extent.

Xdenom [in]

The amount by which to divide the current horizontal extent.

Ynum [in]

The amount by which to multiply the current vertical extent.

Ydenom [in]

The amount by which to divide the current vertical extent.

lpSize [out]

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Coordinate Spaces and Transformations Overview
Coordinate Space and Transformation Functions
GetViewportExtEx
SIZE

 

 

Show: