Important: The information in this document is obsolete and should not be used for new development.
Opcodes in Pictures
Pictures created with theOpenPicture
function in a color graphics port use the picture opcodes of the version 2 format. Pictures created with theOpenCPicture
function use the opcodes of the extended version 2 format. The inclusion of resolution information in the header differentiates the extended version 2 format from the version 2 picture format. The extended version 2 and version 2 formats share the same opcodes, which are listed in Table A-2. The length of the data that follows each 2-byte opcode is listed in this table.Pictures created with the
OpenPicture
function in a basic graphics port use the opcodes of the version 1 format, which are listed in Table A-3 on page A-18.The unused opcodes found throughout Table A-2 and Table A-3 are reserved for Apple use. If these opcodes are encountered in pictures, they and their reserved data bytes can simply be skipped. By default, QuickDraw reads and then ignores these opcodes. Because opcodes must be word-aligned in version 2 and extended version 2 pictures, a byte of 0 (zero) data is added after odd-size data.
- Note
- For opcodes $0100-$7FFF, the amount of data for
opcode $nnXX = 2 times nn bytes.Opcodes $009A (
Table A-2Opcodes for extended version 2 and version 2 pictures Opcode Name Description Size (in bytes) of additional data $0000 NOP No operation 0 $0001 Clip Clipping region Region size $0002 BkPat Background pattern 8 $0003 TxFont Font number for text ( Integer
)2 $0004 TxFace Text's font style ( 0..255
)1 $0005 TxMode Source mode ( Integer
)2 $0006 SpExtra Extra space ( Fixed
)4 $0007 PnSize Pen size ( Point
)4 $0008 PnMode Pen mode ( Integer
)2 $0009 PnPat Pen pattern 8 $000A FillPat Fill pattern 8 $000B OvSize Oval size ( Point
)4 $000C Origin dh
,dv
(Integer)4 $000D TxSize Text size ( Integer
)2 $000E FgColor Foreground color ( Long
)4 $000F BkColor Background color ( Long
)4 $0010 TxRatio Numerator ( Point
), denominator (Point
)8 $0011 VersionOp Version ( 0..255
)1 $0012 BkPixPat Background pixel pattern Variable; see Listing A-1 on page A-17 $0013 PnPixPat Pen pixel pattern Variable; see Listing A-1 on page A-17 $0014 FillPixPat Fill pixel pattern Variable; see Listing A-1 on page A-17 $0015 PnLocHFrac Fractional pen position ( Integer
--low word ofFixed
); if value is not 0.5, pen position is always set to the picture before each text-drawing operation.2 $0016 ChExtra Added width for nonspace characters ( Integer
)2 $0017 Reserved for Apple use Not determined $0018 Reserved for Apple use Not determined $0019 Reserved for Apple use Not determined $001A RGBFgCol Foreground color ( RGBColor
)6 $001B RGBBkCol Background color ( RGBColor
)6 $001C HiliteMode Highlight mode flag: no data; this opcode is sent before a drawing operation that uses the highlight mode 0 $001D HiliteColor Highlight color ( RGBColor
)6 $001E DefHilite Use default highlight color; no data; set highlight to default (from low memory) 0 $001F OpColor Opcolor ( RGBColor
)6 $0020 Line pnLoc
(Point
),newPt
(Point
)8 $0021 LineFrom newPt
(Point
)4 $0022 ShortLine pnLoc
(Point
),dh
(-128..127
),dv
(-128..127
)6 $0023 ShortLineFrom dh
(-128..127
),dv
(-128..127
)2 $0024 Reserved for Apple use Data length ( Integer
), data2 + data length $0025 Reserved for Apple use Data length ( Integer
), data2 + data length $0026 Reserved for Apple use Data length ( Integer
), data2 + data length $0027 Reserved for Apple use Data length ( Integer
), data2 + data length $0028 LongText txLoc
(Point
), count (0..255
), text5 + text $0029 DHText dh
(0..255
), count (0..255
), text2 + text $002A DVText dv
(0..255
), count (0..255
), text2 + text $002B DHDVText dh
(0..255
),dv
(0..255
), count (0..255
), text3 + text $002C fontName Data length ( Integer
), old font ID (Integer
), name length (0..255
), font name[1]5 + name length $002D lineJustify Operand data length ( Integer
), intercharacter spacing (Fixed
), total extra space for justification (Fixed
)[2]10 $002E glyphState Data length ( word
), followed by these 1-byte Boolean values: outline preferred, preserve glyph, fractional widths, scaling disabled8 $002F Reserved for Apple use Data length ( Integer
), data2 + data length $0030 frameRect Rectangle ( Rect
)8 $0031 paintRect Rectangle ( Rect
)8 $0032 eraseRect Rectangle ( Rect
)8 $0033 invertRect Rectangle ( Rect
)8 $0034 fillRect Rectangle ( Rect
)8 $0035 Reserved for Apple use 8 bytes of data 8 $0036 Reserved for Apple use 8 bytes of data 8 $0037 Reserved for Apple use 8 bytes of data 8 $0038 frameSameRect Rectangle ( Rect
)0 $0039 paintSameRect Rectangle ( Rect
)0 $003A eraseSameRect Rectangle ( Rect
)0 $003B invertSameRect Rectangle ( Rect
)0 $003C fillSameRect Rectangle ( Rect
)0 $003D Reserved for Apple use 0 $003E Reserved for Apple use 0 $003F Reserved for Apple use 0 $0040 frameRRect Rectangle ( Rect
)[3]8 $0041 paintRRect Rectangle ( Rect
)[3]8 $0042 eraseRRect Rectangle ( Rect
)[3]8 $0043 invertRRect Rectangle ( Rect
)[3]8 $0044 fillRRect Rectangle ( Rect
)[3]8 $0045 Reserved for Apple use 8 bytes of data 8 $0046 Reserved for Apple use 8 bytes of data 8 $0047 Reserved for Apple use 8 bytes of data 8 $0048 frameSameRRect Rectangle ( Rect
)0 $0049 paintSameRRect Rectangle ( Rect
)0 $004A eraseSameRRect Rectangle ( Rect
)0 $004B invertSameRRect Rectangle ( Rect
)0 $004C fillSameRRect Rectangle ( Rect
)0 $004D Reserved for Apple use 0 $004E Reserved for Apple use 0 $004F Reserved for Apple use 0 $0050 frameOval Rectangle ( Rect
)8 $0051 paintOval Rectangle ( Rect
)8 $0052 eraseOval Rectangle ( Rect
)8 $0053 invertOval Rectangle ( Rect
)8 $0054 fillOval Rectangle ( Rect
)8 $0055 Reserved for Apple use 8 bytes of data 8 $0056 Reserved for Apple use 8 bytes of data 8 $0057 Reserved for Apple use 8 bytes of data 8 $0058 frameSameOval Rectangle ( Rect
)0 $0059 paintSameOval Rectangle ( Rect
)0 $005A eraseSameOval Rectangle ( Rect
)0 $005B invertSameOval Rectangle ( Rect
)0 $005C fillSameOval Rectangle ( Rect
)0 $005D Reserved for Apple use 0 $005E Reserved for Apple use 0 $005F Reserved for Apple use 0 $0060 frameArc Rectangle ( Rect
),startAngle
,arcAngle
12 $0061 paintArc Rectangle ( Rect
),startAngle
,arcAngle
12 $0062 eraseArc Rectangle ( Rect
),startAngle
,arcAngle
12 $0063 invertArc Rectangle ( Rect
),startAngle
,arcAngle
12 $0064 fillArc Rectangle ( Rect
),startAngle
,arcAngle
12 $0065 Reserved for Apple use 12 bytes of data 12 $0066 Reserved for Apple use 12 bytes of data 12 $0067 Reserved for Apple use 12 bytes of data 12 $0068 frameSameArc Rectangle ( Rect
)4 $0069 paintSameArc Rectangle ( Rect
)4 $006A eraseSameArc Rectangle ( Rect
)4 $006B invertSameArc Rectangle ( Rect
)4 $006C fillSameArc Rectangle ( Rect
)4 $006D Reserved for Apple use 4 bytes of data 4 $006E Reserved for Apple use 4 bytes of data 4 $006F Reserved for Apple use 4 bytes of data 4 $0070 framePoly Polygon ( Poly
)Polygon size $0071 paintPoly Polygon ( Poly
)Polygon size $0072 erasePoly Polygon ( Poly
)Polygon size $0073 invertPoly Polygon ( Poly
)Polygon size $0074 fillPoly Polygon ( Poly
)Polygon size $0075 Reserved for Apple use Polygon ( Poly
)Polygon size $0076 Reserved for Apple use Polygon ( Poly
)Polygon size $0077 Reserved for Apple use Polygon ( Poly
)Polygon size $0078 frameSamePoly (Not yet implemented) 0 $0079 paintSamePoly (Not yet implemented) 0 $007A eraseSamePoly (Not yet implemented) 0 $007B invertSamePoly (Not yet implemented) 0 $007C fillSamePoly (Not yet implemented) 0 $007D Reserved for Apple use 0 $007E Reserved for Apple use 0 $007F Reserved for Apple use 0 $0080 frameRgn Region ( Rgn
)Region size $0081 paintRgn Region ( Rgn
)Region size $0082 eraseRgn Region ( Rgn
)Region size $0083 invertRgn Region ( Rgn
)Region size $0084 fillRgn Region ( Rgn
)Region size $0085 Reserved for Apple use Region ( Rgn
)Region size $0086 Reserved for Apple use Region ( Rgn
)Region size $0087 Reserved for Apple use Region ( Rgn
)Region size $0088 frameSameRgn (Not yet implemented) 0 $0089 paintSameRgn (Not yet implemented) 0 $008A eraseSameRgn (Not yet implemented) 0 $008B invertSameRgn (Not yet implemented) 0 $008C fillSameRgn (Not yet implemented) 0 $008D Reserved for Apple use 0 $008E Reserved for Apple use 0 $008F Reserved for Apple use 0 $0090 BitsRect CopyBits
with clipped rectangleVariable[4][5]; see Listing A-2 on page A-17 $0091 BitsRgn CopyBits
with clipped regionVariable[4][5]; see Listing A-3 on page A-18 $0092 Reserved for Apple use Data length ( Integer
), data2 + data length $0093 Reserved for Apple use Data length ( Integer
), data2 + data length $0094 Reserved for Apple use Data length ( Integer
), data2 + data length $0095 Reserved for Apple use Data length ( Integer
), data2 + data length $0096 Reserved for Apple use Data length ( Integer
), data2 + data length $0097 Reserved for Apple use Data length ( Integer
), data2 + data length $0098 PackBitsRect Packed CopyBits
with clipped rectangleVariable[4]; see Listing A-2 on page A-17 $0099 PackBitsRgn Packed CopyBits
with clipped rectangleVariable[4]; see Listing A-3 on page A-18 $009A DirectBitsRect PixMap
,srcRect
,dstRect
,mode
(Integer
),PixData
Variable $009B DirectBitsRgn PixMap
,srcRect
,dstRect
,mode
(Integer
),maskRgn
,PixData
Variable $009C Reserved for Apple use Data length ( Integer
), data2 + data length $009D Reserved for Apple use Data length ( Integer
), data2 + data length $009E Reserved for Apple use Data length ( Integer
), data2 + data length $009F Reserved for Apple use Data length ( Integer
), data2 + data length $00A0 ShortComment Kind ( Integer
)2 $00A1 LongComment Kind ( Integer
), size (Integer
), data4 + data $00A2 Reserved for Apple use Data length ( Integer
), data2 + data length . . . . . . . . . . . . $00AF Reserved for Apple use Data length ( Integer
), data2 + data length $00B0 Reserved for Apple use 0 . . . . . . . . . . . . $00CF Reserved for Apple use 0 $00D0 Reserved for Apple use Data length ( Long
), data4 + data length . . . . . . . . . . . . $00FE Reserved for Apple use Data length ( Long
), data4 + data length $00FF OpEndPic End of picture 2 $0100 Reserved for Apple use 2 bytes of data 2 . . . . . . . . . . . . $01FF Reserved for Apple use 2 bytes of data 2 $0200 Reserved for Apple use 4 bytes of data 4 $02FF Version Version number of picture 2 . . . . . . . . . . . . $0BFF Reserved for Apple use 22 bytes of data 22 $0C00 HeaderOp For extended version 2: version ( Integer
), reserved (Integer
),hRes
,vRes
(Fixed
),srcRect
, reserved (Long
);
for version 2: opcode24 $0C01 Reserved for Apple use 24 bytes of data 24 . . . . . . . . . . . . $7F00 Reserved for Apple use 254 bytes of data 254 . . . . . . . . . . . . $7FFF Reserved for Apple use 254 bytes of data 254 $8000 Reserved for Apple use 0 . . . . . . . . . . . . $80FF Reserved for Apple use 0 $8100 Reserved for Apple use Data length ( Long
), data4 + data length . . . . . . . . . . . . $8200 CompressedQuickTime Data length ( Long
), data (private to QuickTime)4 + data length $8201 UncompressedQuickTime Data length ( Long
), data (private to QuickTime)4 + data length $FFFF Reserved for Apple use Data length ( Long
), data4 + data length DirectBitsRect
) and $009B (DirectBitsRgn
) define direct-pixel pictures, with pixel maps containing three components that directly specify RGB colors. These opcodes allow your application to cut, paste, and store images with up to 32 bits of color information per pixel.The
DirectBitsRect
andDirectBitsRgn
opcodes store thebaseAddr
field of thePixMap
record in a version 2 picture. For compatibility with existing systems, thebaseAddr
field is set to $000000FF. Black-and-white video devices can display pixel maps that are in pictures. On systems without direct-pixel support, opcodes $009A and $009B read a word from the picture and then skip a word of data. The next opcode retrieved from the picture is $00FF, which terminates picture playback. (Note that if you play back a picture on a machine without direct-pixel support, it terminates picture parsing.)The
DirectBitsRect
opcode is followed by this structure:
pixMap: PixMap; srcRect: Rect; {source rectangle} dstRect: Rect; {destination rectangle} mode: Mode; {transfer mode} pixData:TheDirectBitsRgn
opcode is followed by this structure:
pixMap: PixMap; srcRect: Rect; {source rectangle} dstRect: Rect; {destination rectangle} mode: Mode; {transfer mode} maskRgn: Region; {region for masking} pixData:In a picture, thepackType
field of aPixMap
record specifies the manner in which the pixel data was compressed. To facilitate banding of images when memory is short, all data compression is done on a scan-line basis. The following pseudocode describes the pixel data:
PixData: IF packType = 1 (unpacked) OR rowbytes < 8 THEN data is unpacked; data size = rowBytes * (bounds.bottom - bounds.top); IF packType = 2 (drop pad byte) THEN the high-order pad byte of a 32-bit direct pixel is dropped; data size = (3/4) * rowBytes * (bounds.bottom - bounds.top); IF packType > 2 (packed) THEN image contains (bounds.bottom - bounds.top) packed scan lines; each scan line consists of [byteCount] [data]; IF rowBytes > 250 THEN byteCount is a word ELSE it is a byteHere are the currently defined packing types:
Packing type Meaning 0 Use default packing 1 Use no packing 2 Remove pad byte--supported only for 32-bit pixels
(24-bit data)3 Run length encoding by pixelSize
chunks, one scan line
at a time--supported only for 16-bit pixels4 Run length encoding one component at a time, one scan
line at a time, red component first--supported only for
32-bit pixels (24-bit data)For future compatibility, other
packType
values skip scan-line data and draw nothing. Since QuickDraw assumes that pixel map data in memory is unpacked regardless of thepackType
field value, you can usepackType
to tell the picture-recording mechanism what packing technique to use on that data. ApackType
value of 0 in memory indicates that the default packing scheme should be used. (Using the default packing scheme is recommended.) Currently, the defaultpackType
value for apixelSize
value of 16 is type 3; for apixelSize
value of 32, it is type 4. Regardless of the setting ofpackType
at the time of picture recording, thepackType
value actually used to save the image is recorded in the picture.Since each scan line of packed data is preceded by a byte count,
packSize
is not used and must be 0 for future compatibility.When the pixel type is direct,
cmpCount * cmpSize
is less than or equal topixelSize
. For storing 24-bit data in a 32-bit pixel, setcmpSize
to 8 andcmpCount
to 3. If you setcmpCount
to 4, then the high byte is compressed by packing scheme 4 and stored in the picture.The
OpenCPicture
function lets your application create a version 2 format picture and include rectangle and resolution information, which is stored in the version 2 picture header. TheOpenCPicture
function is described in the chapter "Pictures."The
HeaderOp
information is passed to theOpenCPicture
function as anOpenCPicParams
record, which is described in the chapter "Pictures" in this book.The pseudocode in Listing A-1 illustrates the data for the
BkPixPat
,PnPixPat
, andFillPixPat
opcodes.Listing A-1 Data for the
BkPixPat
,PnPixPat
, andFillPixPat
opcodes
IF patType = ditherPat THEN PatType: word; {pattern type = 2} Pat1Data: Pattern; {old pattern data} RGB: RGBColor; {desired RGB for pattern} ELSE PatType: word; {pattern type = 1} Pat1Data: Pattern; {old pattern data} PixMap: PixMap; ColorTable: ColorTable; PixData: PixData; END;The pseudocode in Listing A-2 illustrates the data is stored in theBitsRect
andPackBitsRect
opcodes.Listing A-2 Data for the
BitsRect
andPackBitsRect
opcodes
PixMap: PixMap; {pixel map} ColorTable: ColorTable; {ColorTable record} srcRect: Rect; {source rectangle} dstRect: Rect; {destination rectangle} mode: Word; {transfer mode (may include } { new transfer modes)} PixData: PixData;The pseudocode in Listing A-3 illustrates the data is stored in theBitsRgn
andPackBitsRgn
opcodes.Listing A-3 Data for the
BitsRgn
andPackBitsRgn
opcodes
pixMap: PixMap; colorTable: ColorTable; srcRect: Rect; {source rectangle} dstRect: Rect; {destination rectangle} mode: Word; {transfer mode (may } { include new modes)} maskRgn: Rgn; {region for masking} pixData: PixData;Pictures created with theOpenPicture
function in a basic graphics port use the opcodes of the version 1 format, as listed in Table A-3. This size of data that follows each opcode is also listed in this table. Version 1 pictures are limited to 32 KB.
Table A-3 Opcodes for version 1 pictures (Continued) Opcode Name Description Size (in bytes) of additional data $00 NOP No operation 0 $01 ClipRgn Clipping region Region size $02 BkPat Background pattern 8 $03 TxFont Font number for text ( Integer
)2 $04 TxFace Text's font style ( 0..255
)1 $05 TxMode Source mode ( Integer
)2 $06 SpExtra Extra space ( Fixed
)4 $07 PnSize Pen size ( Point
)4 $08 PnMode Pen mode ( Integer
)2 $09 PnPat Pen pattern 8 $0A FillPat Fill pattern 8 $0B OvSize Oval size ( Point
)4 $0C Origin dh
(Integer
),dv
(Integer
)4 $0D TxSize Text size ( Integer
)2 $0E FgColor Foreground color ( Long
)4 $0F BkColor Background color ( Long
)4 $10 TxRatio Numerator ( Point
), denominator (Point
)8 $11 picVersion Version ( 0..255
)1 $20 Line pnLoc
(Point
),newPt
(Point
)8 $21 LineFrom newPt
(Point
)4 $22 ShortLine pnLoc
(Point
),dh
(-128..127
),dv
(-128..127
)6 $23 ShortLineFrom dh
(-128..127
),dv
(-128..127
)2 $28 LongText txLoc
(Point
), count (0..255
), text5 + text $29 DHText dh
(0..255
), count (0..255
), text2 + text $2A DVText dv
(0..255
), count (0..255
), text2 + text $2B DHDVText dh
(0..255
),dv
(0..255
), count (0..255
), text3 + text $30 frameRect Rectangle ( Rect
)8 $31 paintRect Rectangle ( Rect
)8 $32 eraseRect Rectangle ( Rect
)8 $33 invertRect Rectangle ( Rect
)8 $34 fillRect Rectangle ( Rect
)8 $38 frameSameRect Rectangle ( Rect
)0 $39 paintSameRect Rectangle ( Rect
)0 $3A eraseSameRect Rectangle ( Rect
)0 $3B invertSameRect Rectangle ( Rect
)0 $3C fillSameRect Rectangle ( Rect
)0 $40 frameRRect Rectangle ( Rect
)[6]8 $41 paintRRect Rectangle ( Rect
)8 $42 eraseRRect Rectangle ( Rect
)8 $43 invertRRect Rectangle ( Rect
)8 $44 fillRRect Rectangle ( Rect
)8 $48 frameSameRRect Rectangle ( Rect
)0 $49 paintSameRRect Rectangle ( Rect
)0 $4A eraseSameRRect Rectangle ( Rect
)0 $4B invertSameRRect Rectangle ( Rect
)0 $4C fillSameRRect Rectangle ( Rect
)0 $50 frameOval Rectangle ( Rect
)8 $51 paintOval Rectangle ( Rect
)8 $52 eraseOval Rectangle ( Rect
)8 $53 invertOval Rectangle ( Rect
)8 $54 fillOval Rectangle ( Rect
)8 $58 frameSameOval Rectangle ( Rect
)0 $59 paintSameOval Rectangle ( Rect
)0 $5A eraseSameOval Rectangle ( Rect
)0 $5B invertSameOval Rectangle ( Rect
)0 $5C fillSameOval Rectangle ( Rect
)0 $60 frameArc Rectangle ( Rect
),startAngle
,arcAngle
12 $61 paintArc Rectangle ( Rect
),startAngle
,arcAngle
12 $62 eraseArc Rectangle ( Rect
),startAngle
,arcAngle
12 $63 invertArc Rectangle ( Rect
),startAngle
,arcAngle
12 $64 fillArc Rectangle ( Rect
),startAngle
,arcAngle
12 $68 frameSameArc Rectangle ( Rect
)4 $69 paintSameArc Rectangle ( Rect
)4 $6A eraseSameArc Rectangle ( Rect
)4 $6B invertSameArc Rectangle ( Rect
)4 $6C fillSameArc Rectangle ( Rect
)4 $70 framePoly Polygon ( Poly
)Polygon size $71 paintPoly Polygon ( Poly
)Polygon size $72 erasePoly Polygon ( Poly
)Polygon size $73 invertPoly Polygon ( Poly
)Polygon size $74 fillPoly Polygon ( Poly
)Polygon size $78 frameSamePoly (Not yet implemented) 0 $79 paintSamePoly (Not yet implemented) 0 $7A eraseSamePoly (Not yet implemented) 0 $7B invertSamePoly (Not yet implemented) 0 $7C fillSamePoly (Not yet implemented) 0 $80 frameRgn Region ( Rgn
)Region size $81 paintRgn Region ( Rgn
)Region size $82 eraseRgn Region ( Rgn
)Region size $83 invertRgn Region ( Rgn
)Region size $84 fillRgn Region ( Rgn
)Region size $88 frameSameRgn (Not yet implemented) 0 $89 paintSameRgn (Not yet implemented) 0 $8A eraseSameRgn (Not yet implemented) 0 $8B invertSameRgn (Not yet implemented) 0 $8C fillSameRgn (Not yet implemented) 0 $90 BitsRect CopyBits
with clipped rectangleVariable[7][8]; see Listing A-2 on page A-17 $91 BitsRgn CopyBits
with clipped regionVariable[7][8]; see Listing A-3 on page A-18 $98 PackBitsRect Packed CopyBits
with clipped rectangleVariable[7]; see
Listing A-2 on page A-17$99 PackBitsRgn Packed CopyBits
with clipped rectangleVariable[7]; see
Listing A-3 on page A-18$A0 ShortComment Kind ( Integer
)2 $A1 LongComment Kind ( Integer
), size (Integer
), data4 + data $FF EndOfPicture End of picture 0
[1] The font name information begins with a word containing the field's data length, followed by a word containing the old font ID, a byte containing the length of the font name, and then the font name itself.
You can extract font names, IDs, and other information from a picture by using the routines described in the chapter "Pictures" in this book.
[2] For opcode $002D (lineJustify
), the line justification information contains the line-layout state of the Script Manager so that it can be restored when the picture is played back. It begins with a word containing the field's data length, which should always be 8 bytes. The operands are two fixed-point values, describing the Script Manager's extra character width value and the total extra width that was added to the style run (eachStdText
call) to perform justification.
For example, if the intercharacter spacing were 1 pixel and the total extra width added were 10 pixels, the following hexadecimal bytes would be generated for the picture:2D 00 08 00 01 00 00 00 0A 00 00
In this example, the$002D
opcode is followed by the length word, 00 08, and then the integer part of the intercharacter spacing, 00 01, its fractional part, 00 00, and then the integer part of the total extra spacing, 00 0A, and its fractional part, 00 00.
[3] For opcodes $0040-$0044: rounded rectangles use the setting of theOvSize
point (refer to opcode $000B).
[4] Four opcodes ($0090, $0091, $0098, $0099) are modifications of version 1 opcodes. The first word following the opcode isrowBytes
. If the high bit ofrowBytes
is set, then it is a pixel map containing multiple bits per pixel; if it is not set, it is a bitmap containing 1 bit per pixel. In general, the difference between version 2 and version 1 formats is that the pixel map replaces the bitmap, a color table has been added, andpixData
replacesbitData
.
[5] For opcodes $0090 (BitsRect
) and $0091 (BitsRgn
), the data is unpacked. These opcodes can be used only whenrowBytes
is less than 8.
[6] For opcodes $40-$44: rounded rectangles use the setting of theOvSize
point (refer to
opcode $0B).
[7] In general, the difference between version 2 and version 1 formats is that the pixel map replaces the bitmap, a color table has been added, andpixData
replacesbitData
.
[8] For opcodes $90 (BitsRect
) and $91 (BitsRgn
), the data is unpacked. These opcodes can only be used whenrowBytes
is less than 8.