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 /
Appendix A - Picture Opcodes


A Sample Version 1 Picture

Pictures created by the OpenPicture function on computers without Color QuickDraw, or when the current graphics port is a basic graphics port, are created in version 1 format. The code in Listing A-7 shows what happens when the picture in Figure A-1 on page A-23 is created in version 1 format, saved in a 'PICT' resource, and then decompiled with the DeRez decompiler.

Listing A-7 A decompiled version 1 picture

data 'PICT' (130) {
$"004F"     /* picture size; this value is reliable for version 1 pictures */
$"0002 0002 006E 00AA"  /* bounding rectangle of picture */
$"11"       /* picVersion opcode for version 1 */
   $"01"    /* version number 1 */
$"01"       /* ClipRgn opcode to define clipping region for picture */
   $"000A"  /* region size */
   $"0002 0002 006E 00AA"  /* bounding rectangle for region */
$"0A"       /* FillPat opcode; fill pattern specified in next 8 bytes */
   $"77DD 77DD 77DD 77DD"  /* fill pattern */
$"34"       /* fillRect opcode; rectangle specified in next 8 bytes */
   $"0002 0002 006E 00AA"  /* rectangle to fill */
$"0A"       /* FillPat opcode; fill pattern specified in next 8 bytes */
   $"8822 8822 8822 8822"  /* fill pattern */
$"5C"       /* fillSameOval opcode */
$"71"       /* paintPoly opcode */
   $"001A"  /* size of polygon */
   $"0002 0002 006E 00AA"  /* bounding rectangle for polygon */
   $"006E 0002 0002 0054 006E 00AA 006E 0002"   /* polygon points */
$"FF"       /* EndOfPicture opcode; end of picture */
}


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996