[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
SetViewPortExt( hDC, nWidth, nHeight )-> <aPrevDimensions>
------------------------------------------------------------------------------
PARAMETER:
<hDC> Identifies the device context
<nWidth .. nHeight> Specifies the y-extent and x-extent, in device
units, of the viewport.
RETURNS:
<aPrevDimensions> is an array with the previous dimensions {nWidth,nHeight}
DESCRIPTION:
The SetViewportExt function sets the x- and y-extents of the viewport of
the given device context. The viewport, along with the window, defines
how points are converted from logical coordinates to device coordinates.
The x- and y-extents of the window define how much the graphics device
interface (GDI) must stretch or compress units in the logical coordinate
system to fit units in the device coordinate system. For example, if the
x-extent of the window is 2 and the x-extent of the viewport is 4, GDI
converts two logical units (measured from the x-axis) into four device
units. Similarly, if the y-extent of the window is 2 and the y-extent of
the viewport is -1, GDI converts two logical units (measured from the
y-axis) into one device unit.
The extents also define the relative orientation of the x- and y-axes in
both coordinate systems. If the signs of matching window and viewport
extents are the same, the axes have the same orientation. If the signs are
different, the orientation is reversed. For example, if the y-extent of
the window is 2 and the y-extent of the viewport is -1, GDI converts the
positive y-axis in the logical coordinate system to the negative y-axis in
the device coordinate system. If the x-extents are 2 and 4, GDI converts
the positive x-axis in the logical coordinate system to the positive
x-axis in the device coordinate system.
SOURCE:
SOURCE\WINAPI\DC.C
See Also:
SetWindowExt
SetMapMode
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson