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
Shape Object Omit Byte Constants and Data Types


Glyph Shape Omit Byte Masks and Shifts

The gxOmitGlyphMask1 enumeration defines which bits in an omit byte correspond to the data compression opcode for additional field descriptors in the gx NewGlyphs structure. The sequence of data is also defined. The omit byte and its related data sequence is given in the section "Glyph Shape Data" beginning on page 7-33.

enum gxOmitGlyphMask1 {
   gxOmitGlyphCharactersMask  = 0xC0,
   gxOmitGlyphLengthMask      = 0x30,
   gxOmitGlyphRunNumberMask   = 0x0C,
   gxOmitGlyphOnePositionMask = 0x02,
   gxOmitGlyphDataMask        = 0x01
};
Constant descriptions

gxOmitGlyphCharactersMask
The mask used to select the data compression bits for the charCount function parameter.
gxOmitGlyphLengthMask
The mask used to select the data compression bits for the length in bytes of the data.
gxOmitGlyphRunNumberMask
The mask used to select the data compression bits for the number of styleRuns.
gxOmitGlyphOnePositionMask
The mask used to specify that the position can be represented with one point.
gxOmitGlyphDataMask
The mask used to select the data compression bits for the text function parameter.
Once one of the gxOmitGlyphMask1 enumeration masks has been used to select a data compression opcode for the parameters to GXNewGlyphs function, the corresponding bit shift from the gxOmitGlyphShift1 enumeration 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 data compression opcode so that it can be compared to other values.

enum gxOmitGlyphShift1 {
   gxOmitGlyphCharactersShift    = 6,
   gxOmitGlyphLengthShift        = 4,
   gxOmitGlyphRunNumberShift     = 2,
   gxOmitGlyphOnePositionShift   = 1,
   gxOmitGlyphDataShift          = 0
};
Constant descriptions

gxOmitGlyphCharactersShift
The bit shift required to isolate the compression bits for the charCount function parameter.
gxOmitGlyphLengthShift
The bit shift required to isolate the compression bits for the length in bytes of the data.
gxOmitGlyphRunNumberShift
The bit shift required to isolate the compression bits for the number of styleRuns.
gxOmitGlyphOnePositionShift
The bit shift required to specify that the position can be represented with 1 point.
gxOmitGlyphDataShift
The bit shift required to isolate the compression bits for the text function parameter.
The gxOmitGlyphMask2 enumeration defines which bits in an omit byte correspond to the data compression opcode for the parameters of the GXNewGlyphs function. The sequence of data is also defined. The omit byte and its related data sequence is given in the section "Glyph Shape Data" beginning on page 7-33.

enum gxOmitGlyphMask2 {
   gxOmitGlyphPositionsMask   = 0xC0,
   gxOmitGlyphAdvancesMask    = 0x20,
   gxOmitGlyphTangentsMask    = 0x18,
   gxOmitGlyphRunsMask        = 0x04,
   gxOmitGlyphStylesMask      = 0x03
};
Constant descriptions

gxOmitGlyphPositionsMask
The mask used to select the data compression bits for the positions function parameter.
gxOmitGlyphAdvancesMask
The mask used to select the data compression bits for the advance function parameter.
gxOmitGlyphTangentsMask
The mask used to select the data compression bits for the tangents function parameter.
gxOmitGlyphRunsMask
The mask used to select the data compression bits for the styleRuns function parameter.
gxOmitGlyphStylesMask
The mask used to select the data compression bits for the glyphStyles function parameter.
Once one of the gxOmitGlyphMask2 enumeration masks has been used to select a data compression opcode for the parameters to the GXNewGlyph function, the corresponding bit shift from the gxOmitGlyphShift2 enumeration 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 data compression opcode so that it can be compared to other values.

enum gxOmitGlyphShift2 {
   gxOmitGlyphPositionsShift  = 6,
   gxOmitGlyphAdvancesShift   = 5,
   gxOmitGlyphTangentsShift   = 3,
   gxOmitGlyphRunsShift       = 2,
   gxOmitGlyphStylesShift     = 0
};
Constant descriptions

gxOmitGlyphPositionsShift
The bit shift required to isolate the compression bits for the positions function parameter.
gxOmitGlyphAdvancesShift
The bit shift required to isolate the compression bits for the advance function parameter.
gxOmitGlyphTangentsShift
The bit shift required to isolate the compression bits for the tangents function parameter.
gxOmitGlyphRunsShift
The bit shift required to isolate the compression bits for the styleRuns function parameter.
gxOmitGlyphStylesShift
The bit shift required to isolate the compression bits for the glyphStyles function parameter.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996