Page Viewports

A page viewport is a rectangle in device space, whose origin and size can be varied. The operating system uses the presentation-page rectangle and the page-viewport rectangle to define the device transformation.

An application can determine the current dimensions of the page viewport by calling GpiQueryPageViewport, which returns a pointer to a RECTL structure that contains the coordinates of the viewport. The application can set the location and dimensions of the page viewport by calling GpiSetPageViewport and passing it a pointer to a RECTL structure that contains the new values.

The ratio of the page width to the page-viewport width defines a horizontal scaling factor. The ratio of the page height to the viewport height defines a vertical scaling factor. Applications can use DevQueryCaps to obtain the horizontal and vertical resolution of a device in pels per meter. The dimensions of a pel can vary from one device to another, but they usually fall in the range of 0.25 to 0.50 mm.

The page viewport can be shifted in the device space by a translation transformation.


[Back: Presentation Pages]
[Next: Mapping the Presentation Page to the Device]