Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 5 - Graphics Devices / Graphics Devices Reference
Routines for Graphics Devices / Determining the Characteristics of a Video Device


If you need to determine the resolution of the main device, you can use the ScreenRes procedure.

PROCEDURE ScreenRes (VAR scrnHRes,scrnVRes: Integer);
In the scrnHRes parameter, the ScreenRes procedure returns the number of horizontal pixels per inch displayed by the current device. In the scrnVRes parameter, it returns the number of vertical pixels per inch.

To determine the resolutions of all available graphics devices, you should examine their GDevice records (described on page 5-14). The horizontal and vertical resolutions for a graphics device are stored in the hRes and vRes fields, respectively, of the PixMap record for the device's GDevice record.

Currently, QuickDraw and the Printing Manager always assume a screen resolution of 72 dpi.

Do not use the actual screen resolution as a scaling factor when drawing into a printing graphics port; instead, always use 72 dpi as the scaling factor. See the chapter "Printing Manager" in this book for more information about the Printing Manager and drawing into a printing graphics port.

The horizontal resolution, in pixels per inch, is stored in the global variable ScrHRes, and the vertical resolution is stored in the global variable ScrVRes.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996