GXTypes.pas 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974
  1. {
  2. File: GXTypes.p
  3. Contains: QuickDraw GX object and constant definitions
  4. Version: Technology: Quickdraw GX 1.1
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved.
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit GXTypes;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,MixedMode,FixMath;
  92. {$ALIGN MAC68K}
  93. type
  94. gxShape = ^SInt32; { an opaque 32-bit type }
  95. gxShapePtr = ^gxShape; { when a var xx:gxShape parameter can be nil, it is changed to xx: gxShapePtr }
  96. gxStyle = ^SInt32; { an opaque 32-bit type }
  97. gxStylePtr = ^gxStyle; { when a var xx:gxStyle parameter can be nil, it is changed to xx: gxStylePtr }
  98. gxInk = ^SInt32; { an opaque 32-bit type }
  99. gxInkPtr = ^gxInk; { when a var xx:gxInk parameter can be nil, it is changed to xx: gxInkPtr }
  100. gxTransform = ^SInt32; { an opaque 32-bit type }
  101. gxTransformPtr = ^gxTransform; { when a var xx:gxTransform parameter can be nil, it is changed to xx: gxTransformPtr }
  102. gxTag = ^SInt32; { an opaque 32-bit type }
  103. gxTagPtr = ^gxTag; { when a var xx:gxTag parameter can be nil, it is changed to xx: gxTagPtr }
  104. gxColorSet = ^SInt32; { an opaque 32-bit type }
  105. gxColorSetPtr = ^gxColorSet; { when a var xx:gxColorSet parameter can be nil, it is changed to xx: gxColorSetPtr }
  106. gxColorProfile = ^SInt32; { an opaque 32-bit type }
  107. gxColorProfilePtr = ^gxColorProfile; { when a var xx:gxColorProfile parameter can be nil, it is changed to xx: gxColorProfilePtr }
  108. gxGraphicsClient = ^SInt32; { an opaque 32-bit type }
  109. gxGraphicsClientPtr = ^gxGraphicsClient; { when a var xx:gxGraphicsClient parameter can be nil, it is changed to xx: gxGraphicsClientPtr }
  110. gxViewGroup = ^SInt32; { an opaque 32-bit type }
  111. gxViewGroupPtr = ^gxViewGroup; { when a var xx:gxViewGroup parameter can be nil, it is changed to xx: gxViewGroupPtr }
  112. gxViewPort = ^SInt32; { an opaque 32-bit type }
  113. gxViewPortPtr = ^gxViewPort; { when a var xx:gxViewPort parameter can be nil, it is changed to xx: gxViewPortPtr }
  114. gxViewDevice = ^SInt32; { an opaque 32-bit type }
  115. gxViewDevicePtr = ^gxViewDevice; { when a var xx:gxViewDevice parameter can be nil, it is changed to xx: gxViewDevicePtr }
  116. gxColorSpace = SInt32;
  117. { gxShape enumerations }
  118. const
  119. gxEmptyType = 1;
  120. gxPointType = 2;
  121. gxLineType = 3;
  122. gxCurveType = 4;
  123. gxRectangleType = 5;
  124. gxPolygonType = 6;
  125. gxPathType = 7;
  126. gxBitmapType = 8;
  127. gxTextType = 9;
  128. gxGlyphType = 10;
  129. gxLayoutType = 11;
  130. gxFullType = 12;
  131. gxPictureType = 13;
  132. type
  133. gxShapeType = SInt32;
  134. const
  135. gxNoFill = 0;
  136. gxOpenFrameFill = 1;
  137. gxFrameFill = 1;
  138. gxClosedFrameFill = 2;
  139. gxHollowFill = 2;
  140. gxEvenOddFill = 3;
  141. gxSolidFill = 3;
  142. gxWindingFill = 4;
  143. gxInverseEvenOddFill = 5;
  144. gxInverseSolidFill = 5;
  145. gxInverseFill = 5;
  146. gxInverseWindingFill = 6;
  147. type
  148. gxShapeFill = SInt32;
  149. const
  150. gxNoAttributes = 0;
  151. gxDirectShape = $0001;
  152. gxRemoteShape = $0002;
  153. gxCachedShape = $0004;
  154. gxLockedShape = $0008;
  155. gxGroupShape = $0010;
  156. gxMapTransformShape = $0020;
  157. gxUniqueItemsShape = $0040;
  158. gxIgnorePlatformShape = $0080;
  159. gxNoMetricsGridShape = $0100;
  160. gxDiskShape = $0200;
  161. gxMemoryShape = $0400;
  162. type
  163. gxShapeAttribute = SInt32;
  164. { gxShape editing enumerations }
  165. const
  166. gxBreakNeitherEdit = 0;
  167. gxBreakLeftEdit = $0001;
  168. gxBreakRightEdit = $0002;
  169. gxRemoveDuplicatePointsEdit = $0004;
  170. { if the new first (or last) point exactly matches the point before it in }
  171. { the same contour, then remove it) }
  172. type
  173. gxEditShapeFlag = SInt32;
  174. const
  175. gxSelectToEnd = -1;
  176. gxAnyNumber = 1;
  177. gxSetToNil = -1;
  178. gxCounterclockwiseDirection = 0;
  179. gxClockwiseDirection = 1;
  180. type
  181. gxPointPtr = ^gxPoint;
  182. gxPoint = record
  183. x: Fixed;
  184. y: Fixed;
  185. end;
  186. gxColorValue = UInt16;
  187. gxPolarPtr = ^gxPolar;
  188. gxPolar = record
  189. radius: Fixed;
  190. angle: Fixed;
  191. end;
  192. gxMappingPtr = ^gxMapping;
  193. gxMapping = record
  194. map: array [0..2,0..2] OF Fixed;
  195. end;
  196. type
  197. gxContourDirection = SInt32;
  198. { gxShape structures }
  199. { The type 'gxPoint' is defined in "GXMath.h" }
  200. gxLinePtr = ^gxLine;
  201. gxLine = record
  202. first: gxPoint;
  203. last: gxPoint;
  204. end;
  205. gxCurvePtr = ^gxCurve;
  206. gxCurve = record
  207. first: gxPoint;
  208. control: gxPoint;
  209. last: gxPoint;
  210. end;
  211. gxRectanglePtr = ^gxRectangle;
  212. gxRectangle = record
  213. left: Fixed;
  214. top: Fixed;
  215. right: Fixed;
  216. bottom: Fixed;
  217. end;
  218. gxPolygonPtr = ^gxPolygon;
  219. gxPolygon = record
  220. vectors: SInt32;
  221. vector: array [0..0] of gxPoint;
  222. end;
  223. gxPolygonsPtr = ^gxPolygons;
  224. gxPolygons = record
  225. contours: SInt32;
  226. contour: array [0..0] of gxPolygon;
  227. end;
  228. gxPathPtr = ^gxPath;
  229. gxPath = record
  230. vectors: SInt32;
  231. controlBits: array [0..0] of SInt32;
  232. vector: array [0..0] of gxPoint;
  233. end;
  234. gxPathsPtr = ^gxPaths;
  235. gxPaths = record
  236. contours: SInt32;
  237. contour: array [0..0] of gxPath;
  238. end;
  239. gxBitmapPtr = ^gxBitmap;
  240. gxBitmap = record
  241. image: CStringPtr; { pointer to pixels }
  242. width: SInt32; { width in pixels }
  243. height: SInt32; { height in pixels }
  244. rowBytes: SInt32; { width in bytes }
  245. pixelSize: SInt32; { physical bits per pixel }
  246. space: gxColorSpace;
  247. colorSet: gxColorSet;
  248. profile: gxColorProfile;
  249. end;
  250. gxLongRectanglePtr = ^gxLongRectangle;
  251. gxLongRectangle = record
  252. left: SInt32;
  253. top: SInt32;
  254. right: SInt32;
  255. bottom: SInt32;
  256. end;
  257. { gxStyle enumerations }
  258. const
  259. gxCenterFrameStyle = 0;
  260. gxSourceGridStyle = $0001;
  261. gxDeviceGridStyle = $0002;
  262. gxInsideFrameStyle = $0004;
  263. gxOutsideFrameStyle = $0008;
  264. gxAutoInsetStyle = $0010;
  265. type
  266. gxStyleAttribute = SInt32;
  267. const
  268. gxBendDash = $0001;
  269. gxBreakDash = $0002;
  270. gxClipDash = $0004;
  271. gxLevelDash = $0008;
  272. gxAutoAdvanceDash = $0010;
  273. type
  274. gxDashAttribute = SInt32;
  275. const
  276. gxPortAlignPattern = $0001;
  277. gxPortMapPattern = $0002;
  278. type
  279. gxPatternAttribute = SInt32;
  280. const
  281. gxSharpJoin = $0000;
  282. gxCurveJoin = $0001;
  283. gxLevelJoin = $0002;
  284. gxSnapJoin = $0004;
  285. type
  286. gxJoinAttribute = SInt32;
  287. const
  288. gxLevelStartCap = $0001;
  289. gxLevelEndCap = $0002;
  290. type
  291. gxCapAttribute = SInt32;
  292. const
  293. gxAutoAdvanceText = $0001;
  294. gxNoContourGridText = $0002;
  295. gxNoMetricsGridText = $0004;
  296. gxAnchorPointsText = $0008;
  297. gxVerticalText = $0010;
  298. gxNoOpticalScaleText = $0020;
  299. type
  300. gxTextAttribute = SInt32;
  301. const
  302. gxLeftJustify = 0;
  303. gxCenterJustify = $20000000;
  304. gxRightJustify = $40000000;
  305. gxFillJustify = -1;
  306. gxUnderlineAdvanceLayer = $0001; { a gxLine is drawn through the advances }
  307. gxSkipWhiteSpaceLayer = $0002; { except characters describing white space }
  308. gxUnderlineIntervalLayer = $0004; { (+ gxStringLayer) a gxLine is drawn through the gaps between advances }
  309. gxUnderlineContinuationLayer = $0008; { (+ gxStringLayer) join this underline with another face }
  310. gxWhiteLayer = $0010; { the layer draws to white instead of black }
  311. gxClipLayer = $0020; { the characters define a clip }
  312. gxStringLayer = $0040; { all characters in run are combined }
  313. type
  314. gxLayerFlag = SInt32;
  315. { gxStyle structures }
  316. gxFaceLayerPtr = ^gxFaceLayer;
  317. gxFaceLayer = record
  318. outlineFill: gxShapeFill; { outline framed or filled }
  319. flags: gxLayerFlag; { various additional effects }
  320. outlineStyle: gxStyle; { outline }
  321. outlineTransform: gxTransform; { italic, condense, extend }
  322. boldOutset: gxPoint; { bold }
  323. end;
  324. gxTextFacePtr = ^gxTextFace;
  325. gxTextFace = record
  326. faceLayers: SInt32; { layer to implement shadow }
  327. advanceMapping: gxMapping; { algorithmic change to advance width }
  328. faceLayer: array [0..0] of gxFaceLayer; { zero or more face layers describing the face }
  329. end;
  330. gxJoinRecordPtr = ^gxJoinRecord;
  331. gxJoinRecord = record
  332. attributes: gxJoinAttribute;
  333. join: gxShape;
  334. miter: Fixed;
  335. end;
  336. gxDashRecordPtr = ^gxDashRecord;
  337. gxDashRecord = record
  338. attributes: gxDashAttribute;
  339. dash: gxShape; { similar to pattern, except rotated to gxLine slope }
  340. advance: Fixed; { specifies repeating frequency of dash }
  341. phase: Fract; { specifies offset into the gxPath to start dashing }
  342. scale: Fixed; { specifies height of dash to be mapped to penWidth }
  343. end;
  344. gxPatternRecordPtr = ^gxPatternRecord;
  345. gxPatternRecord = record
  346. attributes: gxPatternAttribute;
  347. pattern: gxShape;
  348. u: gxPoint;
  349. v: gxPoint;
  350. end;
  351. gxCapRecordPtr = ^gxCapRecord;
  352. gxCapRecord = record
  353. attributes: gxCapAttribute;
  354. startCap: gxShape;
  355. endCap: gxShape;
  356. end;
  357. { gxInk enumerations }
  358. const
  359. gxPortAlignDitherInk = $0001;
  360. gxForceDitherInk = $0002;
  361. gxSuppressDitherInk = $0004;
  362. gxSuppressHalftoneInk = $0008;
  363. type
  364. gxInkAttribute = SInt32;
  365. const
  366. gxNoMode = 0;
  367. gxCopyMode = 1;
  368. gxAddMode = 2;
  369. gxBlendMode = 3;
  370. gxMigrateMode = 4;
  371. gxMinimumMode = 5;
  372. gxMaximumMode = 6;
  373. gxHighlightMode = 7;
  374. gxAndMode = 8;
  375. gxOrMode = 9;
  376. gxXorMode = 10;
  377. gxRampAndMode = 11;
  378. gxRampOrMode = 12;
  379. gxRampXorMode = 13;
  380. gxOverMode = 14; { Alpha channel modes }
  381. gxAtopMode = 15; { Note: In England = Beta channel modes }
  382. gxExcludeMode = 16;
  383. gxFadeMode = 17;
  384. type
  385. gxComponentMode = SInt8;
  386. const
  387. gxRejectSourceTransfer = $0001; { at least one component must be out of range }
  388. gxRejectDeviceTransfer = $0002; { at least one component must be out of range }
  389. gxSingleComponentTransfer = $0004; { duplicate gxTransferComponent[0] for all components in transfer }
  390. type
  391. gxTransferFlag = SInt32;
  392. const
  393. gxOverResultComponent = $01; { & result gxColor with 0xFFFF before clamping }
  394. gxReverseComponent = $02; { reverse source and device before moding }
  395. type
  396. gxComponentFlag = SInt8;
  397. { gxInk structures }
  398. gxTransferComponentPtr = ^gxTransferComponent;
  399. gxTransferComponent = record
  400. mode: gxComponentMode; { how the component is operated upon }
  401. flags: gxComponentFlag; { flags for each component }
  402. sourceMinimum: gxColorValue;
  403. sourceMaximum: gxColorValue; { input filter range }
  404. deviceMinimum: gxColorValue;
  405. deviceMaximum: gxColorValue; { output filter range }
  406. clampMinimum: gxColorValue;
  407. clampMaximum: gxColorValue; { output clamping range }
  408. operand: gxColorValue; { ratio for blend, step for migrate, gxColor for highlight }
  409. end;
  410. gxTransferModePtr = ^gxTransferMode;
  411. gxTransferMode = record
  412. space: gxColorSpace; { the gxColor-space the transfer mode is to operate in }
  413. colorSet: gxColorSet;
  414. profile: gxColorProfile;
  415. sourceMatrix: array [0..4,0..3] of Fixed;
  416. deviceMatrix: array [0..4,0..3] of Fixed;
  417. resultMatrix: array [0..4,0..3] of Fixed;
  418. flags: gxTransferFlag;
  419. component: array [0..3] of gxTransferComponent; { how each component is operated upon }
  420. end;
  421. { gxColor space enumerations }
  422. const
  423. gxNoColorPacking = $0000; { 16 bits per channel }
  424. gxAlphaSpace = $0080; { space includes alpha channel }
  425. gxWord5ColorPacking = $0500; { 5 bits per channel, right-justified }
  426. gxLong8ColorPacking = $0800; { 8 bits per channel, right-justified }
  427. gxLong10ColorPacking = $0A00; { 10 bits per channel, right-justified }
  428. gxAlphaFirstPacking = $1000; { alpha channel is the first field in the packed space }
  429. gxNoSpace = 0;
  430. gxRGBSpace = 1;
  431. gxCMYKSpace = 2;
  432. gxHSVSpace = 3;
  433. gxHLSSpace = 4;
  434. gxYXYSpace = 5;
  435. gxXYZSpace = 6;
  436. gxLUVSpace = 7;
  437. gxLABSpace = 8;
  438. gxYIQSpace = 9;
  439. gxNTSCSpace = 9;
  440. gxPALSpace = 9;
  441. gxGraySpace = 10;
  442. gxIndexedSpace = 11;
  443. gxRGBASpace = 129;
  444. gxGrayASpace = 138;
  445. gxRGB16Space = $0501;
  446. gxRGB32Space = $0801;
  447. gxARGB32Space = $1881;
  448. gxCMYK32Space = $0802;
  449. gxHSV32Space = $0A03;
  450. gxHLS32Space = $0A04;
  451. gxYXY32Space = $0A05;
  452. gxXYZ32Space = $0A06;
  453. gxLUV32Space = $0A07;
  454. gxLAB32Space = $0A08;
  455. gxYIQ32Space = $0A09;
  456. gxNTSC32Space = $0A09;
  457. gxPAL32Space = $0A09;
  458. { gxColor space structures }
  459. type
  460. gxRGBColorPtr = ^gxRGBColor;
  461. gxRGBColor = record
  462. red: gxColorValue;
  463. green: gxColorValue;
  464. blue: gxColorValue;
  465. end;
  466. gxRGBAColorPtr = ^gxRGBAColor;
  467. gxRGBAColor = record
  468. red: gxColorValue;
  469. green: gxColorValue;
  470. blue: gxColorValue;
  471. alpha: gxColorValue;
  472. end;
  473. gxHSVColorPtr = ^gxHSVColor;
  474. gxHSVColor = record
  475. hue: gxColorValue;
  476. saturation: gxColorValue;
  477. value: gxColorValue;
  478. end;
  479. gxHLSColorPtr = ^gxHLSColor;
  480. gxHLSColor = record
  481. hue: gxColorValue;
  482. lightness: gxColorValue;
  483. saturation: gxColorValue;
  484. end;
  485. gxCMYKColorPtr = ^gxCMYKColor;
  486. gxCMYKColor = record
  487. cyan: gxColorValue;
  488. magenta: gxColorValue;
  489. yellow: gxColorValue;
  490. black: gxColorValue;
  491. end;
  492. gxXYZColorPtr = ^gxXYZColor;
  493. gxXYZColor = record
  494. x: gxColorValue;
  495. y: gxColorValue;
  496. z: gxColorValue;
  497. end;
  498. gxYXYColorPtr = ^gxYXYColor;
  499. gxYXYColor = record
  500. capY: gxColorValue;
  501. x: gxColorValue;
  502. y: gxColorValue;
  503. end;
  504. gxLUVColorPtr = ^gxLUVColor;
  505. gxLUVColor = record
  506. l: gxColorValue;
  507. u: gxColorValue;
  508. v: gxColorValue;
  509. end;
  510. gxLABColorPtr = ^gxLABColor;
  511. gxLABColor = record
  512. l: gxColorValue;
  513. a: gxColorValue;
  514. b: gxColorValue;
  515. end;
  516. gxYIQColorPtr = ^gxYIQColor;
  517. gxYIQColor = record
  518. y: gxColorValue;
  519. i: gxColorValue;
  520. q: gxColorValue;
  521. end;
  522. gxGrayAColorPtr = ^gxGrayAColor;
  523. gxGrayAColor = record
  524. gray: gxColorValue;
  525. alpha: gxColorValue;
  526. end;
  527. gxColorIndex = SInt32;
  528. gxIndexedColorPtr = ^gxIndexedColor;
  529. gxIndexedColor = record
  530. index: gxColorIndex;
  531. colorSet: gxColorSet;
  532. end;
  533. gxColorPtr = ^gxColor;
  534. gxColor = record
  535. space: gxColorSpace;
  536. profile: gxColorProfile;
  537. case SInt16 of
  538. 0: (
  539. cmyk: gxCMYKColor;
  540. );
  541. 1: (
  542. rgb: gxRGBColor;
  543. );
  544. 2: (
  545. rgba: gxRGBAColor;
  546. );
  547. 3: (
  548. hsv: gxHSVColor;
  549. );
  550. 4: (
  551. hls: gxHLSColor;
  552. );
  553. 5: (
  554. xyz: gxXYZColor;
  555. );
  556. 6: (
  557. yxy: gxYXYColor;
  558. );
  559. 7: (
  560. luv: gxLUVColor;
  561. );
  562. 8: (
  563. lab: gxLABColor;
  564. );
  565. 9: (
  566. yiq: gxYIQColor;
  567. );
  568. 10: (
  569. gray: gxColorValue;
  570. );
  571. 11: (
  572. graya: gxGrayAColor;
  573. );
  574. 12: (
  575. pixel16: UInt16;
  576. );
  577. 13: (
  578. pixel32: UInt32;
  579. );
  580. 14: (
  581. indexed: gxIndexedColor;
  582. );
  583. 15: (
  584. component: array [0..3] of gxColorValue;
  585. );
  586. end;
  587. { gxColorSet structures }
  588. gxSetColorPtr = ^gxSetColor;
  589. gxSetColor = record
  590. case SInt16 of
  591. 0: (
  592. cmyk: gxCMYKColor;
  593. );
  594. 1: (
  595. rgb: gxRGBColor;
  596. );
  597. 2: (
  598. rgba: gxRGBAColor;
  599. );
  600. 3: (
  601. hsv: gxHSVColor;
  602. );
  603. 4: (
  604. hls: gxHLSColor;
  605. );
  606. 5: (
  607. xyz: gxXYZColor;
  608. );
  609. 6: (
  610. yxy: gxYXYColor;
  611. );
  612. 7: (
  613. luv: gxLUVColor;
  614. );
  615. 8: (
  616. lab: gxLABColor;
  617. );
  618. 9: (
  619. yiq: gxYIQColor;
  620. );
  621. 10: (
  622. gray: gxColorValue;
  623. );
  624. 11: (
  625. graya: gxGrayAColor;
  626. );
  627. 12: (
  628. pixel16: UInt16;
  629. );
  630. 13: (
  631. pixel32: UInt32;
  632. );
  633. 14: (
  634. component: array [0..3] of gxColorValue;
  635. );
  636. end;
  637. { gxTransform enumerations }
  638. { parts of a gxShape considered in hit testing: }
  639. const
  640. gxNoPart = 0; { (in order of evaluation) }
  641. gxBoundsPart = $0001;
  642. gxGeometryPart = $0002;
  643. gxPenPart = $0004;
  644. gxCornerPointPart = $0008;
  645. gxControlPointPart = $0010;
  646. gxEdgePart = $0020;
  647. gxJoinPart = $0040;
  648. gxStartCapPart = $0080;
  649. gxEndCapPart = $0100;
  650. gxDashPart = $0200;
  651. gxPatternPart = $0400;
  652. gxGlyphBoundsPart = $0040;
  653. gxGlyphFirstPart = $0080;
  654. gxGlyphLastPart = $0100;
  655. gxSideBearingPart = $0200;
  656. gxAnyPart = $07FF;
  657. type
  658. gxShapePart = SInt32;
  659. { gxTransform structures }
  660. gxHitTestInfoPtr = ^gxHitTestInfo;
  661. gxHitTestInfo = record
  662. what: gxShapePart; { which part of gxShape }
  663. index: SInt32; { control gxPoint index }
  664. distance: Fixed; { how far from gxPoint or outside of area click was }
  665. { these fields are only set by GXHitTestPicture }
  666. which: gxShape;
  667. containerPicture: gxShape; { picture which contains gxShape hit }
  668. containerIndex: SInt32; { the index within that picture }
  669. totalIndex: SInt32; { the total index within the root picture }
  670. end;
  671. { gxViewPort enumerations }
  672. const
  673. gxGrayPort = $0001;
  674. gxAlwaysGridPort = $0002;
  675. gxEnableMatchPort = $0004;
  676. type
  677. gxPortAttribute = SInt32;
  678. { gxViewDevice enumerations }
  679. const
  680. gxDirectDevice = $01; { for the device gxBitmap baseAddr pointer }
  681. gxRemoteDevice = $02;
  682. gxInactiveDevice = $04;
  683. type
  684. gxDeviceAttribute = SInt32;
  685. const
  686. gxRoundDot = 1;
  687. gxSpiralDot = 2;
  688. gxSquareDot = 3;
  689. gxLineDot = 4;
  690. gxEllipticDot = 5;
  691. gxTriangleDot = 6;
  692. gxDispersedDot = 7;
  693. gxCustomDot = 8;
  694. type
  695. gxDotType = SInt32;
  696. { gxViewPort structures }
  697. const
  698. gxNoTint = 0;
  699. gxLuminanceTint = 1; { use the luminance of the gxColor }
  700. gxAverageTint = 2; { add all the components and divide by the number of components }
  701. gxMixtureTint = 3; { find the closest gxColor on the axis between the foreground and background }
  702. gxComponent1Tint = 4; { use the value of the first component of the gxColor }
  703. gxComponent2Tint = 5; { ... etc. }
  704. gxComponent3Tint = 6;
  705. gxComponent4Tint = 7;
  706. type
  707. gxTintType = SInt32;
  708. gxHalftonePtr = ^gxHalftone;
  709. gxHalftone = record
  710. angle: Fixed;
  711. frequency: Fixed;
  712. method: gxDotType;
  713. tinting: gxTintType;
  714. dotColor: gxColor;
  715. backgroundColor: gxColor;
  716. tintSpace: gxColorSpace;
  717. end;
  718. gxHalftoneMatrixPtr = ^gxHalftoneMatrix;
  719. gxHalftoneMatrix = record
  720. dpiX: Fixed; { intended resolution }
  721. dpiY: Fixed;
  722. width: SInt32; { width of matrix (in device pixels) }
  723. height: SInt32; { height of matrix (in device pixels) }
  724. tileShift: SInt32; { shift amount (in samples) for rectangular tiling }
  725. samples: array [0..0] of UInt16; { samples from 0..MAX(halftone tintSpace) }
  726. end;
  727. { gxViewGroup enumerations }
  728. const
  729. gxAllViewDevices = 0;
  730. gxScreenViewDevices = 1;
  731. { graphics stream constants and structures }
  732. gxOpenReadSpool = 1;
  733. gxOpenWriteSpool = 2;
  734. gxReadSpool = 3;
  735. gxWriteSpool = 4;
  736. gxCloseSpool = 5;
  737. type
  738. gxSpoolCommand = SInt32;
  739. gxGraphicsOpcode = SInt8;
  740. gxSpoolBlockPtr = ^gxSpoolBlock;
  741. {$ifc TYPED_FUNCTION_POINTERS}
  742. gxSpoolProcPtr = function(command: gxSpoolCommand; block: gxSpoolBlockPtr): SInt32;
  743. {$elsec}
  744. gxSpoolProcPtr = ProcPtr;
  745. {$endc}
  746. {$ifc OPAQUE_UPP_TYPES}
  747. gxSpoolUPP = ^SInt32; { an opaque UPP }
  748. {$elsec}
  749. gxSpoolUPP = UniversalProcPtr;
  750. {$endc}
  751. gxSpoolBlock = record
  752. spoolProcedure: gxSpoolUPP; { these fields are read only }
  753. buffer: Ptr; { source/destination pointer to data }
  754. bufferSize: SInt32; { how many bytes for the system to read (flatten) / write (unflatten) }
  755. { these fields are written to (but are not read from) }
  756. count: SInt32; { how many bytes for the caller to read (unflatten) /write (flatten) }
  757. operationSize: SInt32; { operation size (including operand byte) }
  758. operationOffset: SInt32; { the data offset, if any, within the current operation }
  759. lastTypeOpcode: gxGraphicsOpcode; { type of last created object }
  760. currentOperation: gxGraphicsOpcode; { operation emitted by flatten, or intrepreted by last unflatten }
  761. currentOperand: gxGraphicsOpcode; { e.g., gxTransformTypeOpcode, gxInkTagOpcode }
  762. compressed: SInt8; { one of: gxTwoBitCompressionValues }
  763. end;
  764. const
  765. uppgxSpoolProcInfo = $000003F1;
  766. {$ifc CALL_NOT_IN_CARBON}
  767. {
  768. * NewgxSpoolUPP()
  769. *
  770. * Availability:
  771. * Non-Carbon CFM: available as macro/inline
  772. * CarbonLib: not available
  773. * Mac OS X: not available
  774. }
  775. function NewgxSpoolUPP(userRoutine: gxSpoolProcPtr): gxSpoolUPP; external name '_NewgxSpoolUPP'; { old name was NewgxSpoolProc }
  776. {
  777. * DisposegxSpoolUPP()
  778. *
  779. * Availability:
  780. * Non-Carbon CFM: available as macro/inline
  781. * CarbonLib: not available
  782. * Mac OS X: not available
  783. }
  784. procedure DisposegxSpoolUPP(userUPP: gxSpoolUPP); external name '_DisposegxSpoolUPP';
  785. {
  786. * InvokegxSpoolUPP()
  787. *
  788. * Availability:
  789. * Non-Carbon CFM: available as macro/inline
  790. * CarbonLib: not available
  791. * Mac OS X: not available
  792. }
  793. function InvokegxSpoolUPP(command: gxSpoolCommand; block: gxSpoolBlockPtr; userRoutine: gxSpoolUPP): SInt32; external name '_InvokegxSpoolUPP'; { old name was CallgxSpoolProc }
  794. {$endc} {CALL_NOT_IN_CARBON}
  795. const
  796. gxFontListFlatten = $01; { if set, generate a gxTag containing list of each gxFont referenced }
  797. gxFontGlyphsFlatten = $02; { if set, generate a gxTag containing the list of glyphs referenced inside the gxFont }
  798. gxFontVariationsFlatten = $04; { if set, append the gxTag with separate [variation] coordinates }
  799. gxBitmapAliasFlatten = $08; { if set, open bitmap alias files and flatten out their image data }
  800. type
  801. gxFlattenFlag = SInt32;
  802. { gxGraphicsClient constants }
  803. const
  804. gxGraphicsSystemClient = -1;
  805. gxStaticHeapClient = $0001;
  806. type
  807. gxClientAttribute = SInt32;
  808. { graphics patching constants }
  809. const
  810. gxOriginalGraphicsFunction = -1;
  811. gxOriginalGraphicsIdentifier = $67726678 (* 'grfx' *);
  812. type
  813. gxBitmapDataSourceAliasPtr = ^gxBitmapDataSourceAlias;
  814. gxBitmapDataSourceAlias = record
  815. fileOffset: UInt32; { file offset (in bytes) of top-left pixel }
  816. aliasRecordSize: UInt32; { size of alias record below }
  817. aliasRecord: SInt8; { the actual alias record data }
  818. end;
  819. const
  820. gxBitmapFileAliasTagType = $6266696C (* 'bfil' *);
  821. gxPICTFileAliasTagType = $70696374 (* 'pict' *);
  822. gxBitmapFileAliasImageValue = 1;
  823. type
  824. gxFont = ^SInt32; { an opaque 32-bit type }
  825. gxFontPtr = ^gxFont; { when a var xx:gxFont parameter can be nil, it is changed to xx: gxFontPtr }
  826. const
  827. gxNoPlatform = 0;
  828. gxNoScript = 0;
  829. gxNoLanguage = 0;
  830. gxNoFontName = 0;
  831. gxGlyphPlatform = -1;
  832. gxUnicodePlatform = 1;
  833. gxMacintoshPlatform = 2;
  834. gxReservedPlatform = 3;
  835. gxMicrosoftPlatform = 4;
  836. gxCustomPlatform = 5;
  837. type
  838. gxFontPlatform = SInt32;
  839. const
  840. gxUnicodeDefaultSemantics = 1;
  841. gxUnicodeV1_1Semantics = 2;
  842. gxISO10646_1993Semantics = 3;
  843. gxRomanScript = 1;
  844. gxJapaneseScript = 2;
  845. gxTraditionalChineseScript = 3;
  846. gxChineseScript = 3;
  847. gxKoreanScript = 4;
  848. gxArabicScript = 5;
  849. gxHebrewScript = 6;
  850. gxGreekScript = 7;
  851. gxCyrillicScript = 8;
  852. gxRussian = 8;
  853. gxRSymbolScript = 9;
  854. gxDevanagariScript = 10;
  855. gxGurmukhiScript = 11;
  856. gxGujaratiScript = 12;
  857. gxOriyaScript = 13;
  858. gxBengaliScript = 14;
  859. gxTamilScript = 15;
  860. gxTeluguScript = 16;
  861. gxKannadaScript = 17;
  862. gxMalayalamScript = 18;
  863. gxSinhaleseScript = 19;
  864. gxBurmeseScript = 20;
  865. gxKhmerScript = 21;
  866. gxThaiScript = 22;
  867. gxLaotianScript = 23;
  868. gxGeorgianScript = 24;
  869. gxArmenianScript = 25;
  870. gxSimpleChineseScript = 26;
  871. gxTibetanScript = 27;
  872. gxMongolianScript = 28;
  873. gxGeezScript = 29;
  874. gxEthiopicScript = 29;
  875. gxAmharicScript = 29;
  876. gxSlavicScript = 30;
  877. gxEastEuropeanRomanScript = 30;
  878. gxVietnameseScript = 31;
  879. gxExtendedArabicScript = 32;
  880. gxSindhiScript = 32;
  881. gxUninterpretedScript = 33;
  882. gxMicrosoftSymbolScript = 1;
  883. gxMicrosoftStandardScript = 2;
  884. gxCustom8BitScript = 1;
  885. gxCustom816BitScript = 2;
  886. gxCustom16BitScript = 3;
  887. type
  888. gxFontScript = SInt32;
  889. const
  890. gxEnglishLanguage = 1;
  891. gxFrenchLanguage = 2;
  892. gxGermanLanguage = 3;
  893. gxItalianLanguage = 4;
  894. gxDutchLanguage = 5;
  895. gxSwedishLanguage = 6;
  896. gxSpanishLanguage = 7;
  897. gxDanishLanguage = 8;
  898. gxPortugueseLanguage = 9;
  899. gxNorwegianLanguage = 10;
  900. gxHebrewLanguage = 11;
  901. gxJapaneseLanguage = 12;
  902. gxArabicLanguage = 13;
  903. gxFinnishLanguage = 14;
  904. gxGreekLanguage = 15;
  905. gxIcelandicLanguage = 16;
  906. gxMalteseLanguage = 17;
  907. gxTurkishLanguage = 18;
  908. gxCroatianLanguage = 19;
  909. gxTradChineseLanguage = 20;
  910. gxUrduLanguage = 21;
  911. gxHindiLanguage = 22;
  912. gxThaiLanguage = 23;
  913. gxKoreanLanguage = 24;
  914. gxLithuanianLanguage = 25;
  915. gxPolishLanguage = 26;
  916. gxHungarianLanguage = 27;
  917. gxEstonianLanguage = 28;
  918. gxLettishLanguage = 29;
  919. gxLatvianLanguage = 29;
  920. gxSaamiskLanguage = 30;
  921. gxLappishLanguage = 30;
  922. gxFaeroeseLanguage = 31;
  923. gxFarsiLanguage = 32;
  924. gxPersianLanguage = 32;
  925. gxRussianLanguage = 33;
  926. gxSimpChineseLanguage = 34;
  927. gxFlemishLanguage = 35;
  928. gxIrishLanguage = 36;
  929. gxAlbanianLanguage = 37;
  930. gxRomanianLanguage = 38;
  931. gxCzechLanguage = 39;
  932. gxSlovakLanguage = 40;
  933. gxSlovenianLanguage = 41;
  934. gxYiddishLanguage = 42;
  935. gxSerbianLanguage = 43;
  936. gxMacedonianLanguage = 44;
  937. gxBulgarianLanguage = 45;
  938. gxUkrainianLanguage = 46;
  939. gxByelorussianLanguage = 47;
  940. gxUzbekLanguage = 48;
  941. gxKazakhLanguage = 49;
  942. gxAzerbaijaniLanguage = 50;
  943. gxAzerbaijanArLanguage = 51;
  944. gxArmenianLanguage = 52;
  945. gxGeorgianLanguage = 53;
  946. gxMoldavianLanguage = 54;
  947. gxKirghizLanguage = 55;
  948. gxTajikiLanguage = 56;
  949. gxTurkmenLanguage = 57;
  950. gxMongolianLanguage = 58;
  951. gxMongolianCyrLanguage = 59;
  952. gxPashtoLanguage = 60;
  953. gxKurdishLanguage = 61;
  954. gxKashmiriLanguage = 62;
  955. gxSindhiLanguage = 63;
  956. gxTibetanLanguage = 64;
  957. gxNepaliLanguage = 65;
  958. gxSanskritLanguage = 66;
  959. gxMarathiLanguage = 67;
  960. gxBengaliLanguage = 68;
  961. gxAssameseLanguage = 69;
  962. gxGujaratiLanguage = 70;
  963. gxPunjabiLanguage = 71;
  964. gxOriyaLanguage = 72;
  965. gxMalayalamLanguage = 73;
  966. gxKannadaLanguage = 74;
  967. gxTamilLanguage = 75;
  968. gxTeluguLanguage = 76;
  969. gxSinhaleseLanguage = 77;
  970. gxBurmeseLanguage = 78;
  971. gxKhmerLanguage = 79;
  972. gxLaoLanguage = 80;
  973. gxVietnameseLanguage = 81;
  974. gxIndonesianLanguage = 82;
  975. gxTagalogLanguage = 83;
  976. gxMalayRomanLanguage = 84;
  977. gxMalayArabicLanguage = 85;
  978. gxAmharicLanguage = 86;
  979. gxTigrinyaLanguage = 87;
  980. gxGallaLanguage = 88;
  981. gxOromoLanguage = 88;
  982. gxSomaliLanguage = 89;
  983. gxSwahiliLanguage = 90;
  984. gxRuandaLanguage = 91;
  985. gxRundiLanguage = 92;
  986. gxChewaLanguage = 93;
  987. gxMalagasyLanguage = 94;
  988. gxEsperantoLanguage = 95;
  989. gxWelshLanguage = 129;
  990. gxBasqueLanguage = 130;
  991. gxCatalanLanguage = 131;
  992. gxLatinLanguage = 132;
  993. gxQuechuaLanguage = 133;
  994. gxGuaraniLanguage = 134;
  995. gxAymaraLanguage = 135;
  996. gxTatarLanguage = 136;
  997. gxUighurLanguage = 137;
  998. gxDzongkhaLanguage = 138;
  999. gxJavaneseRomLanguage = 139;
  1000. gxSundaneseRomLanguage = 140;
  1001. type
  1002. gxFontLanguage = SInt32;
  1003. const
  1004. gxCopyrightFontName = 1;
  1005. gxFamilyFontName = 2;
  1006. gxStyleFontName = 3;
  1007. gxUniqueFontName = 4;
  1008. gxFullFontName = 5;
  1009. gxVersionFontName = 6;
  1010. gxPostscriptFontName = 7;
  1011. gxTrademarkFontName = 8;
  1012. gxManufacturerFontName = 9;
  1013. gxLastReservedFontName = 256;
  1014. type
  1015. gxFontName = SInt32;
  1016. gxFontTableTag = SInt32;
  1017. gxFontVariationTag = SInt32;
  1018. gxFontFormatTag = SInt32;
  1019. gxFontStorageTag = SInt32;
  1020. gxFontDescriptorTag = gxFontVariationTag;
  1021. gxFontVariationPtr = ^gxFontVariation;
  1022. gxFontVariation = record
  1023. name: gxFontVariationTag;
  1024. value: Fixed;
  1025. end;
  1026. gxFontDescriptor = gxFontVariation;
  1027. gxFontDescriptorPtr = ^gxFontDescriptor;
  1028. gxFontFeatureSettingPtr = ^gxFontFeatureSetting;
  1029. gxFontFeatureSetting = record
  1030. setting: UInt16;
  1031. nameID: UInt16;
  1032. end;
  1033. const
  1034. gxSystemFontAttribute = $0001;
  1035. gxReadOnlyFontAttribute = $0002;
  1036. type
  1037. gxFontAttribute = SInt32;
  1038. const
  1039. gxMutuallyExclusiveFeature = $00008000;
  1040. type
  1041. gxFontFeatureFlag = SInt32;
  1042. gxFontFeature = SInt32;
  1043. const
  1044. gxResourceFontStorage = $72737263 (* 'rsrc' *);
  1045. gxHandleFontStorage = $686E646C (* 'hndl' *);
  1046. gxFileFontStorage = $62617373 (* 'bass' *);
  1047. gxNfntFontStorage = $6E666E74 (* 'nfnt' *);
  1048. type
  1049. gxFontStorageReference = Ptr;
  1050. gxGlyphcode = UInt16;
  1051. { single glyph in a font }
  1052. { byte offset within backing store }
  1053. gxByteOffset = SInt32;
  1054. { The actual constants for feature types and selectors have been moved to a library. }
  1055. gxRunFeatureType = UInt16;
  1056. gxRunFeatureSelector = UInt16;
  1057. { If tracking is not desired, specify the following value in the track field in the
  1058. gxRunControls record (note that a track of 0 does *not* mean to turn tracking off;
  1059. rather, it means to use normal tracking). }
  1060. const
  1061. gxNoTracking = $80000000;
  1062. { The special "gxNoStake" value is returned by the GXGetLayoutBreakOffset call to
  1063. indicate the absence of a character offset that is stable with respect to
  1064. metamorphosis and contextual kerning. }
  1065. gxNoStake = -1;
  1066. { A glyph's behavior with respect to other glyphs on its line is defined in part by its
  1067. gxBaselineType. These types allow correct alignment of the baselines of all glyphs on
  1068. the line. }
  1069. gxRomanBaseline = 0;
  1070. gxIdeographicCenterBaseline = 1;
  1071. gxIdeographicLowBaseline = 2;
  1072. gxHangingBaseline = 3;
  1073. gxMathBaseline = 4;
  1074. gxLastBaseline = 31;
  1075. gxNumberOfBaselineTypes = 32;
  1076. gxNoOverrideBaseline = 255;
  1077. type
  1078. gxBaselineType = UInt32;
  1079. gxBaselineDeltas = array [0..31] of Fixed;
  1080. { gxJustificationPriority defines the point during the justification process at which a
  1081. glyph will begin to receive deltas before and after itself. }
  1082. const
  1083. gxKashidaPriority = 0;
  1084. gxWhiteSpacePriority = 1;
  1085. gxInterCharPriority = 2;
  1086. gxNullJustificationPriority = 3;
  1087. gxNumberOfJustificationPriorities = 4;
  1088. type
  1089. gxJustificationPriority = UInt8;
  1090. { gxJustificationFlags are used to control which fields of a gxWidthDeltaRecord are to
  1091. be overridden and which are not if a gxPriorityJustificationOverride or
  1092. gxGlyphJustificationOverride (qq.v.) is specified. }
  1093. const
  1094. gxOverridePriority = $8000; { use priority value from override }
  1095. gxOverrideLimits = $4000; { use limits values from override }
  1096. gxOverrideUnlimited = $2000; { use unlimited flag from override }
  1097. gxUnlimitedGapAbsorption = $1000; { glyph can take unlimited gap }
  1098. gxJustificationPriorityMask = $000F; { justification priority }
  1099. gxAllJustificationFlags = $F00F;
  1100. type
  1101. gxJustificationFlags = UInt16;
  1102. { The directional behavior of a glyph can be overridden using a gxDirectionOverride. }
  1103. const
  1104. gxNoDirectionOverride = 0;
  1105. gxImposeLeftToRight = 1;
  1106. gxImposeRightToLeft = 2;
  1107. gxImposeArabic = 3;
  1108. type
  1109. gxDirectionOverride = UInt16;
  1110. { gxRunControlFlags describe the nonparametric layout options contained in a gxStyle. }
  1111. const
  1112. gxNoCaretAngle = $40000000;
  1113. gxImposeWidth = $20000000;
  1114. gxNoCrossKerning = $10000000;
  1115. gxNoOpticalAlignment = $08000000;
  1116. gxForceHanging = $04000000;
  1117. gxNoSpecialJustification = $02000000;
  1118. gxDirectionOverrideMask = $00000003;
  1119. gxNoLigatureSplits = $80000000;
  1120. gxAllRunControlFlags = $FE000003;
  1121. type
  1122. gxRunControlFlags = UInt32;
  1123. { gxHighlightType is used to distinguish various highlighting methods, both in terms of
  1124. character offset based vs. visual based, and in terms of angled sides vs. non-angled
  1125. sides. }
  1126. const
  1127. gxHighlightStraight = 0; { straight-edged simple highlighting }
  1128. gxHighlightAverageAngle = 1; { takes average of two edge angles }
  1129. type
  1130. gxHighlightType = UInt32;
  1131. { gxCaretType is used to control whether the caret that is returned from GXGetLayoutCaret
  1132. is a split caret or a (keyboard-syncronized) single caret. }
  1133. const
  1134. gxSplitCaretType = 0; { returns Mac-style split caret (default) }
  1135. gxLeftRightKeyboardCaret = 1; { single caret in left-right position }
  1136. gxRightLeftKeyboardCaret = 2; { single caret in right-left position }
  1137. type
  1138. gxCaretType = UInt32;
  1139. { gxLayoutOffsetState describes the characteristics of a given gxByteOffset in some
  1140. layout. It is returned by the GXGetOffsetGlyphs call. Note that the
  1141. gxOffsetInsideLigature value is returned in addition to the 8/16 (or invalid)
  1142. indication. }
  1143. const
  1144. gxOffset8_8 = 0;
  1145. gxOffset8_16 = 1;
  1146. gxOffset16_8 = 2;
  1147. gxOffset16_16 = 3;
  1148. gxOffsetInvalid = 4;
  1149. gxOffsetInsideLigature = $8000;
  1150. type
  1151. gxLayoutOffsetState = UInt16;
  1152. { gxLayoutOptionsFlags are single-bit flags contained in a gxLayoutOptions record. We
  1153. also define here some utility constants that are useful in setting various fields in
  1154. the gxLayoutOptions record. }
  1155. const
  1156. gxNoLayoutOptions = 0;
  1157. gxLineIsDisplayOnly = $00000001;
  1158. gxKeepSpacesInMargin = $00000002;
  1159. gxLimitReorderingToTwoLevels = $00000004;
  1160. gxLineLeftEdgeNotAtMargin = $00000008;
  1161. gxLineRightEdgeNotAtMargin = $00000010;
  1162. gxAllLayoutOptionsFlags = $0000001F;
  1163. gxMaxRunLevel = 15;
  1164. gxFlushLeft = 0;
  1165. gxFlushCenter = $20000000;
  1166. gxFlushRight = $40000000;
  1167. gxNoJustification = 0;
  1168. gxFullJustification = $40000000;
  1169. type
  1170. gxLayoutOptionsFlags = UInt32;
  1171. { A gxRunFeature describes a feature and a level for that feature. }
  1172. gxRunFeaturePtr = ^gxRunFeature;
  1173. gxRunFeature = record
  1174. featureType: gxRunFeatureType;
  1175. featureSelector: gxRunFeatureSelector;
  1176. end;
  1177. { A gxWidthDeltaRecord contains all of the information needed to describe the behavior of one
  1178. class of glyphs during the justification process. }
  1179. gxWidthDeltaRecordPtr = ^gxWidthDeltaRecord;
  1180. gxWidthDeltaRecord = record
  1181. beforeGrowLimit: Fixed; { ems AW can grow by at most on LT }
  1182. beforeShrinkLimit: Fixed; { ems AW can shrink by at most on LT }
  1183. afterGrowLimit: Fixed; { ems AW can grow by at most on RB }
  1184. afterShrinkLimit: Fixed; { ems AW can shrink by at most on RB }
  1185. growFlags: gxJustificationFlags; { flags controlling grow case }
  1186. shrinkFlags: gxJustificationFlags; { flags controlling shrink case }
  1187. end;
  1188. { A gxPriorityJustificationOverride contains an array of WidthDeltaRecords, one for each
  1189. gxJustificationPriority. }
  1190. gxPriorityJustificationOverridePtr = ^gxPriorityJustificationOverride;
  1191. gxPriorityJustificationOverride = record
  1192. deltas: array [0..3] of gxWidthDeltaRecord; { overrides for each of the priorities }
  1193. end;
  1194. { A gxGlyphJustificationOverride contains a gxWidthDeltaRecord that is to be used for a
  1195. specific glyph in a specific run (this limitation is because glyphcodes vary by font). }
  1196. gxGlyphJustificationOverridePtr = ^gxGlyphJustificationOverride;
  1197. gxGlyphJustificationOverride = record
  1198. glyph: gxGlyphcode;
  1199. override: gxWidthDeltaRecord;
  1200. end;
  1201. { gxRunControls contains flags, shifts, imposed widths and overrides for a run. }
  1202. { NOTE: a value of "gxNoTracking" (see above) in track disables tracking }
  1203. gxRunControlsPtr = ^gxRunControls;
  1204. gxRunControls = record
  1205. flags: gxRunControlFlags;
  1206. beforeWithStreamShift: Fixed;
  1207. afterWithStreamShift: Fixed;
  1208. crossStreamShift: Fixed;
  1209. imposedWidth: Fixed;
  1210. track: Fixed;
  1211. hangingInhibitFactor: Fract;
  1212. kerningInhibitFactor: Fract;
  1213. decompositionAdjustmentFactor: Fixed;
  1214. baselineType: gxBaselineType;
  1215. end;
  1216. { A gxGlyphSubstitution describes one client-provided substitution that occurs after all
  1217. other automatic glyph changes have happened. }
  1218. gxGlyphSubstitutionPtr = ^gxGlyphSubstitution;
  1219. gxGlyphSubstitution = record
  1220. originalGlyph: gxGlyphcode; { Whenever you see this glyph... }
  1221. substituteGlyph: gxGlyphcode; { ...change it to this one. }
  1222. end;
  1223. { gxKerningAdjustmentFactors specify an adjustment to automatic kerning. The adjustment
  1224. is ax + b where x is the automatic kerning value, a is scaleFactor, and b is
  1225. adjustmentPointSizeFactor times the run's point size. }
  1226. gxKerningAdjustmentFactorsPtr = ^gxKerningAdjustmentFactors;
  1227. gxKerningAdjustmentFactors = record
  1228. scaleFactor: Fract;
  1229. adjustmentPointSizeFactor: Fixed;
  1230. end;
  1231. { A gxKerningAdjustment identifies with- and cross-stream kerning adjustments
  1232. for specific glyph pairs. }
  1233. gxKerningAdjustmentPtr = ^gxKerningAdjustment;
  1234. gxKerningAdjustment = record
  1235. firstGlyph: gxGlyphcode;
  1236. secondGlyph: gxGlyphcode;
  1237. withStreamFactors: gxKerningAdjustmentFactors;
  1238. crossStreamFactors: gxKerningAdjustmentFactors;
  1239. end;
  1240. { A value of gxResetCrossStreamFactor in crossStreamFactors.adjustmentPointSizeFactor
  1241. will reset the cross-stream kerning to the baseline. }
  1242. const
  1243. gxResetCrossStreamFactor = $80000000;
  1244. { gxLayoutHitInfo contains the output from the GXHitTestLayout call. }
  1245. type
  1246. gxLayoutHitInfoPtr = ^gxLayoutHitInfo;
  1247. gxLayoutHitInfo = record
  1248. firstPartialDist: Fixed;
  1249. lastPartialDist: Fixed;
  1250. hitSideOffset: gxByteOffset;
  1251. nonHitSideOffset: gxByteOffset;
  1252. leadingEdge: boolean;
  1253. inLoose: boolean;
  1254. end;
  1255. { A gxLineBaselineRecord contains the deltas from 0 to all the different baselines for
  1256. the layout. It can be filled via a call to GetBaselineDeltas (q.v.). }
  1257. gxLineBaselineRecordPtr = ^gxLineBaselineRecord;
  1258. gxLineBaselineRecord = record
  1259. deltas: gxBaselineDeltas;
  1260. end;
  1261. { The gxLayoutOptions type contains information about the layout characteristics of the
  1262. whole line. }
  1263. gxLayoutOptionsPtr = ^gxLayoutOptions;
  1264. gxLayoutOptions = record
  1265. width: Fixed;
  1266. flush: Fract;
  1267. just: Fract;
  1268. flags: gxLayoutOptionsFlags;
  1269. baselineRec: gxLineBaselineRecordPtr;
  1270. end;
  1271. const
  1272. gxNewObjectOpcode = $00; { create new object }
  1273. gxSetDataOpcode = $40; { add reference to current object }
  1274. gxSetDefaultOpcode = $80; { replace current default with this object }
  1275. gxReservedOpcode = $C0; { (may be used in future expansion) }
  1276. gxNextOpcode = $FF; { used by currentOperand field to say opcode is coming }
  1277. { new object types (new object opcode) }
  1278. gxHeaderTypeOpcode = $00; { byte following new object uses bottom 6 bits for type }
  1279. { gxShape types use values 1 (gxEmptyType) through 13 (gxPictureType) }
  1280. gxStyleTypeOpcode = $28;
  1281. gxInkTypeOpcode = $29;
  1282. gxTransformTypeOpcode = $2A;
  1283. gxColorProfileTypeOpcode = $2B;
  1284. gxColorSetTypeOpcode = $2C;
  1285. gxTagTypeOpcode = $2D;
  1286. gxBitImageOpcode = $2E;
  1287. gxFontNameTypeOpcode = $2F;
  1288. gxTrailerTypeOpcode = $3F;
  1289. { fields of objects (set data opcodes) }
  1290. gxShapeAttributesOpcode = 0;
  1291. gxShapeTagOpcode = 1;
  1292. gxShapeFillOpcode = 2;
  1293. gxOmitPathPositionXMask = $C0;
  1294. gxOmitPathPositionYMask = $30;
  1295. gxOmitPathDeltaXMask = $0C;
  1296. gxOmitPathDeltaYMask = $03;
  1297. gxOmitPathPositionXShift = 6;
  1298. gxOmitPathPositionYShift = 4;
  1299. gxOmitPathDeltaXShift = 2;
  1300. gxOmitPathDeltaYShift = 0;
  1301. gxOmitBitmapImageMask = $C0;
  1302. gxOmitBitmapWidthMask = $30;
  1303. gxOmitBitmapHeightMask = $0C;
  1304. gxOmitBitmapRowBytesMask = $03;
  1305. gxOmitBitmapImageShift = 6;
  1306. gxOmitBitmapWidthShift = 4;
  1307. gxOmitBitmapHeightShift = 2;
  1308. gxOmitBitmapRowBytesShift = 0;
  1309. gxOmitBitmapPixelSizeMask = $C0;
  1310. gxOmitBitmapSpaceMask = $30;
  1311. gxOmitBitmapSetMask = $0C;
  1312. gxOmitBitmapProfileMask = $03;
  1313. gxOmitBitmapPixelSizeShift = 6;
  1314. gxOmitBitmapSpaceShift = 4;
  1315. gxOmitBitmapSetShift = 2;
  1316. gxOmitBitmapProfileShift = 0;
  1317. gxOmitBitmapPositionXMask = $C0;
  1318. gxOmitBitmapPositionYMask = $30;
  1319. gxOmitBitmapPositionXShift = 6;
  1320. gxOmitBitmapPositionYShift = 4;
  1321. gxOmitBitImageRowBytesMask = $C0;
  1322. gxOmitBitImageHeightMask = $30;
  1323. gxOmitBitImageDataMask = $08;
  1324. gxOmitBitImageRowBytesShift = 6;
  1325. gxOmitBitImageHeightShift = 4;
  1326. gxOmitBitImageDataShift = 3;
  1327. gxCopyBitImageBytesOpcode = $00;
  1328. gxRepeatBitImageBytesOpcode = $40;
  1329. gxLookupBitImageBytesOpcode = $80;
  1330. gxRepeatBitImageScanOpcode = $C0;
  1331. gxOmitTextCharactersMask = $C0;
  1332. gxOmitTextPositionXMask = $30;
  1333. gxOmitTextPositionYMask = $0C;
  1334. gxOmitTextDataMask = $02;
  1335. gxOmitTextCharactersShift = 6;
  1336. gxOmitTextPositionXShift = 4;
  1337. gxOmitTextPositionYShift = 2;
  1338. gxOmitTextDataShift = 1;
  1339. gxOmitGlyphCharactersMask = $C0;
  1340. gxOmitGlyphLengthMask = $30;
  1341. gxOmitGlyphRunNumberMask = $0C;
  1342. gxOmitGlyphOnePositionMask = $02;
  1343. gxOmitGlyphDataMask = $01;
  1344. gxOmitGlyphCharactersShift = 6;
  1345. gxOmitGlyphLengthShift = 4;
  1346. gxOmitGlyphRunNumberShift = 2;
  1347. gxOmitGlyphOnePositionShift = 1;
  1348. gxOmitGlyphDataShift = 0;
  1349. gxOmitGlyphPositionsMask = $C0;
  1350. gxOmitGlyphAdvancesMask = $20;
  1351. gxOmitGlyphTangentsMask = $18;
  1352. gxOmitGlyphRunsMask = $04;
  1353. gxOmitGlyphStylesMask = $03;
  1354. gxOmitGlyphPositionsShift = 6;
  1355. gxOmitGlyphAdvancesShift = 5;
  1356. gxOmitGlyphTangentsShift = 3;
  1357. gxOmitGlyphRunsShift = 2;
  1358. gxOmitGlyphStylesShift = 0;
  1359. gxOmitLayoutLengthMask = $C0;
  1360. gxOmitLayoutPositionXMask = $30;
  1361. gxOmitLayoutPositionYMask = $0C;
  1362. gxOmitLayoutDataMask = $02;
  1363. gxOmitLayoutLengthShift = 6;
  1364. gxOmitLayoutPositionXShift = 4;
  1365. gxOmitLayoutPositionYShift = 2;
  1366. gxOmitLayoutDataShift = 1;
  1367. gxOmitLayoutWidthMask = $C0;
  1368. gxOmitLayoutFlushMask = $30;
  1369. gxOmitLayoutJustMask = $0C;
  1370. gxOmitLayoutOptionsMask = $03;
  1371. gxOmitLayoutWidthShift = 6;
  1372. gxOmitLayoutFlushShift = 4;
  1373. gxOmitLayoutJustShift = 2;
  1374. gxOmitLayoutOptionsShift = 0;
  1375. gxOmitLayoutStyleRunNumberMask = $C0;
  1376. gxOmitLayoutLevelRunNumberMask = $30;
  1377. gxOmitLayoutHasBaselineMask = $08;
  1378. gxOmitLayoutStyleRunsMask = $04;
  1379. gxOmitLayoutStylesMask = $03;
  1380. gxOmitLayoutStyleRunNumberShift = 6;
  1381. gxOmitLayoutLevelRunNumberShift = 4;
  1382. gxOmitLayoutHasBaselineShift = 3;
  1383. gxOmitLayoutStyleRunsShift = 2;
  1384. gxOmitLayoutStylesShift = 0;
  1385. gxOmitLayoutLevelRunsMask = $80;
  1386. gxOmitLayoutLevelsMask = $40;
  1387. gxOmitLayoutLevelRunsShift = 7;
  1388. gxOmitLayoutLevelsShift = 6;
  1389. gxInkAttributesOpcode = 0;
  1390. gxInkTagOpcode = 1;
  1391. gxInkColorOpcode = 2;
  1392. gxInkTransferModeOpcode = 3;
  1393. gxOmitColorsSpaceMask = $C0;
  1394. gxOmitColorsProfileMask = $30;
  1395. gxOmitColorsComponentsMask = $0F;
  1396. gxOmitColorsIndexMask = $0C;
  1397. gxOmitColorsIndexSetMask = $03;
  1398. gxOmitColorsSpaceShift = 6;
  1399. gxOmitColorsProfileShift = 4;
  1400. gxOmitColorsComponentsShift = 0;
  1401. gxOmitColorsIndexShift = 2;
  1402. gxOmitColorsIndexSetShift = 0;
  1403. gxOmitTransferSpaceMask = $C0;
  1404. gxOmitTransferSetMask = $30;
  1405. gxOmitTransferProfileMask = $0C;
  1406. gxOmitTransferSpaceShift = 6;
  1407. gxOmitTransferSetShift = 4;
  1408. gxOmitTransferProfileShift = 2;
  1409. gxOmitTransferSourceMatrixMask = $C0;
  1410. gxOmitTransferDeviceMatrixMask = $30;
  1411. gxOmitTransferResultMatrixMask = $0C;
  1412. gxOmitTransferFlagsMask = $03;
  1413. gxOmitTransferSourceMatrixShift = 6;
  1414. gxOmitTransferDeviceMatrixShift = 4;
  1415. gxOmitTransferResultMatrixShift = 2;
  1416. gxOmitTransferFlagsShift = 0;
  1417. gxOmitTransferComponentModeMask = $80;
  1418. gxOmitTransferComponentFlagsMask = $40;
  1419. gxOmitTransferComponentSourceMinimumMask = $30;
  1420. gxOmitTransferComponentSourceMaximumMask = $0C;
  1421. gxOmitTransferComponentDeviceMinimumMask = $03;
  1422. gxOmitTransferComponentModeShift = 7;
  1423. gxOmitTransferComponentFlagsShift = 6;
  1424. gxOmitTransferComponentSourceMinimumShift = 4;
  1425. gxOmitTransferComponentSourceMaximumShift = 2;
  1426. gxOmitTransferComponentDeviceMinimumShift = 0;
  1427. gxOmitTransferComponentDeviceMaximumMask = $C0;
  1428. gxOmitTransferComponentClampMinimumMask = $30;
  1429. gxOmitTransferComponentClampMaximumMask = $0C;
  1430. gxOmitTransferComponentOperandMask = $03;
  1431. gxOmitTransferComponentDeviceMaximumShift = 6;
  1432. gxOmitTransferComponentClampMinimumShift = 4;
  1433. gxOmitTransferComponentClampMaximumShift = 2;
  1434. gxOmitTransferComponentOperandShift = 0;
  1435. gxStyleAttributesOpcode = 0;
  1436. gxStyleTagOpcode = 1;
  1437. gxStyleCurveErrorOpcode = 2;
  1438. gxStylePenOpcode = 3;
  1439. gxStyleJoinOpcode = 4;
  1440. gxStyleDashOpcode = 5;
  1441. gxStyleCapsOpcode = 6;
  1442. gxStylePatternOpcode = 7;
  1443. gxStyleTextAttributesOpcode = 8;
  1444. gxStyleTextSizeOpcode = 9;
  1445. gxStyleFontOpcode = 10;
  1446. gxStyleTextFaceOpcode = 11;
  1447. gxStylePlatformOpcode = 12;
  1448. gxStyleFontVariationsOpcode = 13;
  1449. gxStyleRunControlsOpcode = 14;
  1450. gxStyleRunPriorityJustOverrideOpcode = 15;
  1451. gxStyleRunGlyphJustOverridesOpcode = 16;
  1452. gxStyleRunGlyphSubstitutionsOpcode = 17;
  1453. gxStyleRunFeaturesOpcode = 18;
  1454. gxStyleRunKerningAdjustmentsOpcode = 19;
  1455. gxStyleJustificationOpcode = 20;
  1456. gxOmitDashAttributesMask = $C0;
  1457. gxOmitDashShapeMask = $30;
  1458. gxOmitDashAdvanceMask = $0C;
  1459. gxOmitDashPhaseMask = $03;
  1460. gxOmitDashAttributesShift = 6;
  1461. gxOmitDashShapeShift = 4;
  1462. gxOmitDashAdvanceShift = 2;
  1463. gxOmitDashPhaseShift = 0;
  1464. gxOmitDashScaleMask = $C0;
  1465. gxOmitDashScaleShift = 6;
  1466. gxOmitPatternAttributesMask = $C0;
  1467. gxOmitPatternShapeMask = $30;
  1468. gxOmitPatternUXMask = $0C;
  1469. gxOmitPatternUYMask = $03;
  1470. gxOmitPatternAttributesShift = 6;
  1471. gxOmitPatternShapeShift = 4;
  1472. gxOmitPatternUXShift = 2;
  1473. gxOmitPatternUYShift = 0;
  1474. gxOmitPatternVXMask = $C0;
  1475. gxOmitPatternVYMask = $30;
  1476. gxOmitPatternVXShift = 6;
  1477. gxOmitPatternVYShift = 4;
  1478. gxOmitJoinAttributesMask = $C0;
  1479. gxOmitJoinShapeMask = $30;
  1480. gxOmitJoinMiterMask = $0C;
  1481. gxOmitJoinAttributesShift = 6;
  1482. gxOmitJoinShapeShift = 4;
  1483. gxOmitJoinMiterShift = 2;
  1484. gxOmitCapAttributesMask = $C0;
  1485. gxOmitCapStartShapeMask = $30;
  1486. gxOmitCapEndShapeMask = $0C;
  1487. gxOmitCapAttributesShift = 6;
  1488. gxOmitCapStartShapeShift = 4;
  1489. gxOmitCapEndShapeShift = 2;
  1490. gxOmitFaceLayersMask = $C0;
  1491. gxOmitFaceMappingMask = $30;
  1492. gxOmitFaceLayersShift = 6;
  1493. gxOmitFaceMappingShift = 4;
  1494. gxOmitFaceLayerFillMask = $C0;
  1495. gxOmitFaceLayerFlagsMask = $30;
  1496. gxOmitFaceLayerStyleMask = $0C;
  1497. gxOmitFaceLayerTransformMask = $03;
  1498. gxOmitFaceLayerFillShift = 6;
  1499. gxOmitFaceLayerFlagsShift = 4;
  1500. gxOmitFaceLayerStyleShift = 2;
  1501. gxOmitFaceLayerTransformShift = 0;
  1502. gxOmitFaceLayerBoldXMask = $C0;
  1503. gxOmitFaceLayerBoldYMask = $30;
  1504. gxOmitFaceLayerBoldXShift = 6;
  1505. gxOmitFaceLayerBoldYShift = 4;
  1506. gxColorSetReservedOpcode = 0;
  1507. gxColorSetTagOpcode = 1;
  1508. gxColorProfileReservedOpcode = 0;
  1509. gxColorProfileTagOpcode = 1;
  1510. gxTransformReservedOpcode = 0;
  1511. gxTransformTagOpcode = 1;
  1512. gxTransformClipOpcode = 2;
  1513. gxTransformMappingOpcode = 3;
  1514. gxTransformPartMaskOpcode = 4;
  1515. gxTransformToleranceOpcode = 5;
  1516. gxTypeOpcode = 0;
  1517. gxSizeOpcode = 1;
  1518. { used by currentOperand when currentOperation is gxNextOpcode }
  1519. { format of top byte:
  1520. xx yyyyyy xx == 0x00, 0x40, 0x80, 0xC0: defines graphics operation (see gxGraphicsOperationOpcode)
  1521. yyyyyy == size of operation in bytes
  1522. if (yyyyyy == 0), byte size follows. If byte following == 0, word size follows; if == 0, long follows
  1523. word and long, if present, are specified in high-endian order (first byte is largest magnitude)
  1524. format of byte following size specifiers, if any:
  1525. xx yyyyyy xx == 0x00, 0x40, 0x80, 0xC0: defines compression level (0 == none, 0xC0 == most)
  1526. exact method of compression is defined by type of data
  1527. yyyyyy == data type selector (0 to 63): see gxGraphicsNewOpcode, __DataOpcode
  1528. }
  1529. gxOpcodeShift = 6;
  1530. gxObjectSizeMask = $3F;
  1531. gxCompressionShift = 6;
  1532. gxObjectTypeMask = $3F;
  1533. gxBitImageOpcodeMask = $C0;
  1534. gxBitImageCountMask = $3F;
  1535. gxBitImageOpcodeShift = 6;
  1536. gxNoCompression = 0;
  1537. gxWordCompression = 1;
  1538. gxByteCompression = 2;
  1539. gxOmitCompression = 3;
  1540. gxCompressionMask = $03;
  1541. { the following structures define how primitives without a public geometry
  1542. are stored (their format mirrors that of the New call to create them) }
  1543. type
  1544. gxFlatFontNamePtr = ^gxFlatFontName;
  1545. gxFlatFontName = record
  1546. name: SInt8; { gxFontName }
  1547. platform: SInt8; { gxFontPlatform }
  1548. script: SInt8; { gxFontScript }
  1549. language: SInt8; { gxFontLanguage }
  1550. length: SInt16; { byte length }
  1551. end;
  1552. const
  1553. gxFlatFontListItemTag = $666C7374 (* 'flst' *);
  1554. type
  1555. gxFlatFontListItemPtr = ^gxFlatFontListItem;
  1556. gxFlatFontListItem = record
  1557. fontID: gxFont; { ** if we get rid of this, remove #include "font types.h", above }
  1558. name: SInt8; { gxFontName }
  1559. platform: SInt8; { gxFontPlatform }
  1560. script: SInt8; { gxFontScript }
  1561. language: SInt8; { gxFontLanguage }
  1562. length: SInt16; { byte length of the name that follows }
  1563. glyphCount: UInt16; { CountFontGlyphs or 0 if gxFontGlyphsFlatten is false }
  1564. axisCount: UInt16; { CountFontVariations or 0 if gxFontVariationsFlatten is false }
  1565. variationCount: UInt16; { number of bitsVariationPairs that follow the (optional) glyphBits }
  1566. end;
  1567. gxFlatFontListPtr = ^gxFlatFontList;
  1568. gxFlatFontList = record
  1569. count: SInt32;
  1570. items: array [0..0] of gxFlatFontListItem;
  1571. end;
  1572. gxFlattenHeaderPtr = ^gxFlattenHeader;
  1573. gxFlattenHeader = record
  1574. version: Fixed;
  1575. flatFlags: SInt8;
  1576. padding: SInt8;
  1577. end;
  1578. const
  1579. gxOmitPictureShapeMask = $C0;
  1580. gxOmitOverrideStyleMask = $30;
  1581. gxOmitOverrideInkMask = $0C;
  1582. gxOmitOverrideTransformMask = $03;
  1583. gxOmitPictureShapeShift = $06;
  1584. gxOmitOverrideStyleShift = $04;
  1585. gxOmitOverrideInkShift = $02;
  1586. gxOmitOverrideTransformShift = $00;
  1587. gxPostScriptTag = $706F7374 (* 'post' *);
  1588. gxPostControlTag = $70736374 (* 'psct' *);
  1589. gxNoSave = 1; { don't do save-restore around PS data }
  1590. gxPSContinueNext = 2; { next shape is continuation of this shape's PS -- only obeyed if gxNoSave is true }
  1591. type
  1592. gxPostControlPtr = ^gxPostControl;
  1593. gxPostControl = record
  1594. flags: SInt32; { PostScript state flags }
  1595. end;
  1596. const
  1597. gxDashSynonymTag = $73647368 (* 'sdsh' *);
  1598. type
  1599. gxDashSynonymPtr = ^gxDashSynonym;
  1600. gxDashSynonym = record
  1601. size: SInt32; { number of elements in array }
  1602. dashLength: array [0..0] of Fixed; { Array of dash lengths }
  1603. end;
  1604. const
  1605. gxLineCapSynonymTag = $6C636170 (* 'lcap' *);
  1606. gxButtCap = 0;
  1607. gxRoundCap = 1;
  1608. gxSquareCap = 2;
  1609. gxTriangleCap = 3;
  1610. { gxLine cap type }
  1611. type
  1612. gxLineCapSynonym = SInt32;
  1613. const
  1614. gxCubicSynonymTag = $63756278 (* 'cubx' *);
  1615. gxIgnoreFlag = $0000; { Ignore this word, get next one }
  1616. gxLineToFlag = $0001; { Draw a gxLine to gxPoint following this flag }
  1617. gxCurveToFlag = $0002; { Draw a gxCurve through the 3 points following this flag }
  1618. gxMoveToFlag = $0003; { Start a new contour at the gxPoint following this flag }
  1619. gxClosePathFlag = $0004; { Close the contour }
  1620. type
  1621. gxCubicSynonym = SInt32;
  1622. const
  1623. gxCubicInstructionMask = $000F; { low four bits are gxPoint instructions }
  1624. { Low four bits are instruction (moveto, lineto, curveto, closepath) }
  1625. type
  1626. gxCubicSynonymFlags = SInt16;
  1627. const
  1628. gxPatternSynonymTag = $7074726E (* 'ptrn' *);
  1629. gxHatch = 0;
  1630. gxCrossHatch = 1;
  1631. type
  1632. gxPatternSynonymPtr = ^gxPatternSynonym;
  1633. gxPatternSynonym = record
  1634. patternType: SInt32; { one of the gxPatterns: gxHatch or gxCrossHatch }
  1635. angle: Fixed; { angle at which pattern is drawn }
  1636. spacing: Fixed; { distance between two parallel pattern lines }
  1637. thickness: Fixed; { thickness of the pattern }
  1638. anchorPoint: gxPoint; { gxPoint with with respect to which pattern position is calculated }
  1639. end;
  1640. const
  1641. gxURLTag = $75726C74 (* 'urlt' *);
  1642. {$ALIGN MAC68K}
  1643. end.