Important: The information in this document is obsolete and should not be used for new development.
OpenPicture
TheOpenPicture
function, which was created for earlier versions of system software, is described here for completeness. To create a picture, you should use theOpenCPicture
function, which allows you to specify resolutions for your pictures, as explained in the previous routine description.
FUNCTION OpenPicture (picFrame:\xDDRect): PicHandle;
picFrame
- The bounding rectangle for the picture. The
DrawPicture
procedure uses this rectangle to scale the picture if you draw it into a destination rectangle of a different size.DESCRIPTION
TheOpenPicture
function returns a handle to a newPicture
record (described on page 7-26). You can use theOpenPicture
function to begin defining a picture;OpenPicture
collects your subsequent drawing commands in this record. When defining a picture, you can use all other QuickDraw drawing routines described in this book, with the exception ofCopyMask
,CopyDeepMask
,SeedFill
,SeedCFill
,CalcMask
, andCalcCMask
. (Nor can you use thePlotCIcon
procedure, described in Inside Macintosh: More Macintosh Toolbox.) You can also use thePicComment
procedure (described on page 7-39) to include picture comments in your picture definition.The
OpenPicture
function creates pictures in the version 2 format on computers with Color QuickDraw when the current graphics port is a color graphics port. Pictures created in this format support color drawing operations at 72 dpi. On computers supporting only basic QuickDraw, or when the current graphics port is a basic graphics port, this function creates pictures in version 1 format. Pictures created in version 1 format support only black-and-white drawing operations at 72 dpi.Use the handle returned by
OpenPicture
when referring to the picture in subsequent routines, such as theDrawPicture
procedure.The
OpenPicture
function calls theHidePen
procedure, so no drawing occurs on the screen while the picture is open (unless you call theShowPen
procedure just afterOpenPicture
or you calledShowPen
previously without balancing it by a call toHidePen
).After defining the picture, close it by using the
ClosePicture
procedure, described on page 7-41. To draw the picture, use theDrawPicture
procedure, described on page 7-43.SPECIAL CONSIDERATIONS
The version 2 and version 1 picture formats support only 72-dpi resolution. TheOpenCPicture
function creates pictures in the extended version 2 format. The extended version 2 format, which is created by theOpenCPicture
function on all Macintosh computers running System 7, permits your application to specify additional resolutions when creating images.See the description of the
OpenCPicture
function for its list of special considerations, all of which apply toOpenPicture
.Version 1 pictures are limited to 32 KB. You can determine the picture size while it's being formed by calling the Memory Manager function
GetHandleSize
.