DrawPictureFile
The DrawPictureFile function draws an image from a specified picture file (PICT file) in the current graphics port. Your program also specifies the destination rectangle for the image.
pascal OSErr DrawPictureFile (short refNum, const Rect *frame,
ProgressProcRecordPtr progressProc);
refNum
- Contains a file reference number for the source PICT file.
frame
- Contains a pointer to the rectangle into which the image is to be loaded. The compressor scales the source image to fit into this destination rectangle.
progressProc
- Points to a progress function structure. During the operation, the draw function may occasionally call a function you provide in order to report its progress (see "Progress Functions" beginning on page 3-146 for more information about progress functions). If you have not provided a progress function, set this parameter to
nil. If you pass a value of -1, you obtain a standard progress function.
DESCRIPTION
The DrawPictureFile function is essentially the same as QuickDraw's DrawPicture routine, except that DrawPictureFile reads the picture from disk. (For details on DrawPicture, see Inside Macintosh: Imaging.) The Image Compression Manager performs any spooling that may be necessary when reading the picture file.
RESULT CODES
| noErr | 0 | No error |
| paramErr | -50 | Invalid parameter specified |
| memFullErr | -108 | Not enough memory available |
| codecAbortErr | -8967 | Operation aborted by the progress function |
File Manager errors