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: QuickDraw GX Environment and Utilities /
Chapter 7 - QuickDraw GX Stream Format / QuickDraw GX Stream Format Reference
Opcode Constants and Data Types


Bit Image Compression Opcode Byte

Bits 6 and 7 of the bit image compression opcode byte contain the compression type opcode that describes the data compression used for a region of a a bit image.The gxBitimageOpcodeMask constant, binary 11000000, masks bits 6 and 7 of the bit image compression opcode byte to select the bit image opcode.

#define gxBitimageOpcodeMask 0xC0
Once the gxBitimageOpcodeMask constant has been used to select the compression type opcode, a bit shift given by the gxBitimageOpcodeShift constant can be applied to the selected bits. The selected bits must be moved to the right by the indicated number of bits to isolate the compression type opcode so that it can be compared to other values.

#define gxBitimageOpcodeShift 6
Bits 0 through 5 of the bit image compression opcode byte contain the bit image count. This is the number of times that a binary sequence is repeated. The gxBitimageCountMask constant, binary 111111, masks bits 0 through 5 of the bit image compression opcode byte to select the bit image count. No shift is required to compare the bit image count with other values.

#define gxBitimageCountMask0x3F
Table 7-13 gives the bit image compression opcode constants. For additional information about the use of the bit image compression opcode byte, see the section "New Bit Image Object Data" beginning on page 7-49.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996