Carbon


OpenCPicParams

Header: Quickdraw.h

struct OpenCPicParams {
    Rect srcRect; 
    Fixed hRes; 
    Fixed vRes; 
    SInt16 version; 
    SInt16 reserved1; 
    SInt32 reserved2;
};

Field descriptions

srcRect

The optimal bounding rectangle for the resolution indicated by the hRes and vRes fields. When you later call the DrawPicture function to play back the saved picture, specify a destination rectangle and DrawPicture scales the picture so that it is completely aligned with the destination rectangle. To display a picture at a resolution other than that specified in these two fields, compute an appropriate destination rectangle by scaling its width and height by the following factor:

scale factor = destination resolution / source resolution

hRes

The best horizontal resolution for the picture. A value of $0048000 specifies a horizontal resolution of 72 dpi.

vRes

The best vertical resolution for the picture. A value of $00480000 specifies a horizontal resolution of 72 dpi.

version

Always set this field to –2.

reserved1

Reserved; set to 0.

reserved2

Reserved; set to 0.

When you use the OpenCPicture function to begin creating a picture, you must pass it information in an OpenCPicParams structure. This structure provides a simple mechanism for specifying resolutions when creating images. For example, applications that create pictures from scanned images can specify resolutions higher than 72 dpi for these pictures in OpenCPicParams structures.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)