Picture Opcode Data Types
The picture opcodes use the data types that are summarized in Table A-1.
Table A-1 Data types for picture opcodes (Continued)
| Data type | Size |
| -128..127 | 1 byte (signed) |
| 0..255 | 1 byte |
| Fixed | 4 bytes |
| Integer | 2 bytes |
| Long | 4 bytes |
| Mode | 2 bytes |
| Opcode | 2 bytes |
| Pattern | 8 bytes |
| Point | 4 bytes |
| Poly | 10+ bytes |
| Rect | 8 bytes (top, left, bottom, right: integer) |
| Rgn | 10+ bytes |
| RowBytes | 2 bytes (always an even quantity) |
In addition, some picture opcode types, such as BkPixPat, may use the PixMap, ColorTable, and PixData data types, which makes the length of these opcodes quite variable. The PixMap record and ColorTable record are described in the chapter "Color QuickDraw" in this book. The following pseudocode describes the PixData data type:
PixData: {pseudocode describing the PixData data type}
IF rowBytes < 8 THEN
data is unpacked;
data size = rowBytes*(bounds.bottom-bounds.top);
IF rowBytes >= 8 THEN
data is packed;
image contains (bounds.bottom-bounds.top) packed scanlines;
packed scanlines are produced by the PackBits routine;
each scanline consists of [byteCount] [data];
IF rowBytes > 250 THEN
byteCount is a word;
ELSE
byteCount is a byte.
END;