Important: The information in this document is obsolete and should not be used for new development.
Number Formats and Constants
QuickDraw GX providesFixed
,fract
, andgxColorValue
number formats. Polar coordinates are defined by thegxPolar
structure. A structure consisting of twolong
values defines thewide
number format.
typedef long fract; typedef unsigned short gxColorValue; struct gxPolar { Fixed radius; Fixed angle; }; struct wide { long hi; unsigned long lo; };For convenience, QuickDraw GX provides constants for the value 1.0 forFixed
,fract
, andgxColorValue
types:
#define fixed1 ((Fixed) 0x00010000) #define fract1 ((fract) 0x40000000) #define gxColorValue1 ((gxColorValue) 0xFFFF)QuickDraw GX also provides constants for the largest and smallest possible values forFixed
andfract
numbers:
#define gxPositiveInfinity ((Fixed) 0x7FFFFFFF) #define gxNegativeInfinity ((Fixed) 0x80000000)