Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1369 lines
41 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: rfntobj.hxx
  3. *
  4. * The realized font user object, and memory objects.
  5. *
  6. * The realized font object:
  7. * ------------------------
  8. *
  9. * o represents a realized font--both device and IFI
  10. *
  11. * o created when a logical font is mapped to a physical font (i.e., the
  12. * font is realized)
  13. *
  14. * o stores information to identify DCs compatible with the realized font
  15. *
  16. * o exist on a per font, per PDEV basis
  17. *
  18. * o two devices using the same font will have separate realized fonts
  19. *
  20. * o helps prevent different devices from interferring with each other
  21. * when hitting the caches
  22. *
  23. * o multiple DC's may use the same realized font simultaneously
  24. *
  25. * o concerned with glyphs images and glyph metrics
  26. *
  27. * o glyph images are retrieved through the realized font object
  28. *
  29. * o this should be done in response to a vTextOut
  30. *
  31. * o an RFONT can return EITHER bitmaps or outlines as image
  32. * data, but not both
  33. *
  34. * o glyph metric information can be retrieved through the realized
  35. * font object
  36. *
  37. * o spacing, character increments, character bitmap bounding box,
  38. * etc.
  39. *
  40. * o a realized font deals with DEVICE COORDINATES
  41. *
  42. * o supports the following APIs:
  43. *
  44. * o ExtTextOut (provide glyph metrics and bitmaps)
  45. *
  46. * o GetCharWidth
  47. *
  48. * o GetTextExtentPoint (provide glyph metrics)
  49. *
  50. *
  51. * Created: 25-Oct-1990 13:13:03
  52. * Author: Gilman Wong [gilmanw]
  53. *
  54. * Copyright (c) 1990-1999 Microsoft Corporation
  55. *
  56. \**************************************************************************/
  57. /*********************************Struct***********************************\
  58. * struct CACHE_PARM
  59. *
  60. * Structure which defines the system-wide font cache parameters.
  61. *
  62. * cjMax Maximum size of any one cache. Should be an integral
  63. * number of pages.
  64. *
  65. * cjMinInitial Minimum starting size for a font cache.
  66. *
  67. * cjMinIncrement Amount by which the size of the font cache is
  68. * incrementally grown.
  69. *
  70. * History:
  71. * 07-Mar-1992 -by- Gilman Wong [gilmanw]
  72. * Wrote it.
  73. \**************************************************************************/
  74. /*********************************Struct***********************************\
  75. * struct CACHE
  76. *
  77. *
  78. * History:
  79. * 10-Apr-1991 -by- Gilman Wong [gilmanw]
  80. * Wrote it.
  81. *
  82. * 24-Nov-92 -by- Paul Butzi
  83. * Rewrote it.
  84. \**************************************************************************/
  85. #ifndef GDIFLAGS_ONLY // used for gdikdx
  86. // blocks of memory used to store glyphdata's
  87. typedef struct _DATABLOCK *PDATABLOCK;
  88. typedef struct _DATABLOCK
  89. {
  90. PDATABLOCK pdblNext;
  91. ULONG cgd;
  92. GLYPHDATA agd[1];
  93. } DATABLOCK;
  94. // blocks of memory used to store glyphbits
  95. typedef struct _BITBLOCK *PBITBLOCK;
  96. typedef struct _BITBLOCK
  97. {
  98. PBITBLOCK pbblNext; // next block in the list
  99. BYTE ajBits[1]; // bits
  100. } BITBLOCK;
  101. typedef struct {
  102. UINT wcLow;
  103. COUNT cGlyphs;
  104. GLYPHDATA **apgd;
  105. } GPRUN;
  106. typedef struct {
  107. COUNT cRuns;
  108. GLYPHDATA *pgdDefault; // DEFAULT glyph
  109. GPRUN agpRun[1];
  110. } WCGP;
  111. typedef struct _CACHE {
  112. // Info for GLYPHDATA portion of cache
  113. GLYPHDATA *pgdNext; // ptr to next free place to put GLYPHDATA
  114. GLYPHDATA *pgdThreshold; // ptr to first uncommited spot
  115. BYTE *pjFirstBlockEnd; // ptr to end of first GLYPHDATA block
  116. DATABLOCK *pdblBase; // ptr to base of current GLYPHDATA block
  117. ULONG cMetrics; // number of GLYPHDATA's in the metrics cache
  118. // Info for GLYPHBITS portion of cache
  119. ULONG cjbblInitial; // size of initial bit block
  120. ULONG cjbbl; // size of any individual block in bytes
  121. ULONG cBlocksMax; // max # of blocks allowed
  122. ULONG cBlocks; // # of blocks allocated so far
  123. ULONG cGlyphs; // for statistical purposes only
  124. ULONG cjTotal; // also for stat purposes only
  125. BITBLOCK *pbblBase; // ptr to the first bit block (head of the list)
  126. BITBLOCK *pbblCur; // ptr to the block containing next
  127. BYTE *pgbNext; // ptr to next free place to put GLYPHBITS
  128. BYTE *pgbThreshold; // end of the current block
  129. // Info for lookaside portion of cache
  130. PBYTE pjAuxCacheMem; // ptr to lookaside buffer, if any
  131. SIZE_T cjAuxCacheMem; // size of current lookaside buffer
  132. // Miscellany
  133. ULONGSIZE_T cjGlyphMax; // size of largest glyph
  134. // WARNING: this must include the sizeof the GLYPHBITS metric
  135. // data, so it needs to be at least offsetof(GLYPBITS,aj)
  136. // Type of metrics being cached
  137. BOOL bSmallMetrics;
  138. // binary cache search, used mostly for fe fonts
  139. INT iMax;
  140. INT iFirst;
  141. INT cBits;
  142. } CACHE;
  143. /**************************************************************************\
  144. * struct RFONTLINK
  145. *
  146. * This structure is used to form doubly linked lists of RFONTs.
  147. *
  148. \**************************************************************************/
  149. typedef struct _RFONTLINK { /* rfl */
  150. RFONT *prfntPrev;
  151. RFONT *prfntNext;
  152. } RFONTLINK, *PRFONTLINK;
  153. #endif // GDIFLAGS_ONLY used for gdikdx
  154. /**************************************************************************\
  155. * enum RFL_TYPE
  156. *
  157. * Identifies the RFONT list a link is used for.
  158. *
  159. \**************************************************************************/
  160. typedef enum _RFL_TYPE {
  161. PFF_LIST = 0, // list off of a PFF
  162. PDEV_LIST // list off of a PDEV
  163. } RFL_TYPE;
  164. /*********************************Class************************************\
  165. * class EXTFONTOBJ
  166. *
  167. * The EXTFONTOBJ contains the FONTOBJ structure passed across the DDI to
  168. * identify a realized font, plus a set of flags that identify the source
  169. * as journalled or non-journalled.
  170. *
  171. * History:
  172. * 08-Jan-1993 -by- Gilman Wong [gilmanw]
  173. * Wrote it.
  174. \**************************************************************************/
  175. #ifndef GDIFLAGS_ONLY // used for gdikdx
  176. class EXTFONTOBJ
  177. {
  178. public:
  179. FONTOBJ fobj; // pass to DDI
  180. };
  181. class ESTROBJ;
  182. class XDCOBJ;
  183. /*********************************Class************************************\
  184. * class RFONT
  185. *
  186. * Realized font object
  187. *
  188. * iUnique Uniqueness number.
  189. *
  190. * ufd Union which represents the driver used to access the font.
  191. * If the font is an IFI font, then ufd is an HFDEV.
  192. * If the font is a device font, then ufd is an HLDEV.
  193. *
  194. * Along with lhFont, this is enough to make glyph queries.
  195. *
  196. * hfc The IFI handle to the font context (HFC). If this is not
  197. * an IFI font, then hfc has the value HFC_INVALID.
  198. *
  199. * ctxtinfo The transform and such used to realize the font. Can
  200. * used to identify compatible DCs (but make sure to remove
  201. * translations from the DC's transform).
  202. *
  203. * cBitsPerPel Number of bits per pel this font is realized for. (Each
  204. * pel resolution has its own realization).
  205. *
  206. * ppfe Identifies the physical font entry which corresponds to this
  207. * realized font. Needed to allow updating of the reference
  208. * counts in the PFE (cRFONT and cActiveRFONT).
  209. *
  210. * ppff Indentifies the physical font file from which this RFONT
  211. * is realized.
  212. *
  213. * hpdev Handle used to identify the device for which this RFONT
  214. * was created.
  215. *
  216. * dhpdev Device handle of the physical device for which this RFONT
  217. * was created. Cached from PDEV upon realization. Shouldn't
  218. * be used for displays that support dynamic mode changing, as
  219. * the device's dhpdev can be updated at any time, and currently
  220. * this field is not updated.
  221. *
  222. * mxWorldToDevice The matrix describing the World to Device transform that
  223. * was used to realize this font (translations removed).
  224. * This matrix is compared against the transform in a DC
  225. * to determine if this font realization is usable for that
  226. * DC.
  227. *
  228. * Device metrics cached here. Cached here upon
  229. * realization to speed access for text positioning
  230. *
  231. * eptflBaseOrt
  232. * eptflSideOrt
  233. * efCharInc
  234. * efMaxAscender
  235. * efMaxDescender
  236. * efMaxExtent
  237. * ptlUnderline1
  238. * ptlStrikeOut
  239. * ulULThickness
  240. * ulSOThickness
  241. * cxMax;
  242. *
  243. * bOutline Is TRUE if this font realization transformable (outlines).
  244. *
  245. * hglyDefault The handle of the default glyph. Cached here to speed
  246. * up UNICODE->HGLYPH translations.
  247. *
  248. * prfntNext Used to form a linked lists of active and inactive RFONTs
  249. * off of the PDEV.
  250. *
  251. * hsemCache Handle to semaphore that controls access to the cache.
  252. *
  253. * cache Glyph data cache. This is a variable length structure and
  254. * MUST be at the end of the object.
  255. *
  256. * History:
  257. * 30-Oct-1990 -by- Gilman Wong [gilmanw]
  258. * Wrote it.
  259. \**************************************************************************/
  260. class PFE;
  261. #endif // GDIFLAGS_ONLY used for gdikdx
  262. #define RFONT_TYPE_NOCACHE 1
  263. // 2 more types to indicate if this rfont is intended to service
  264. // unicode or ETO_GLYPHINDEX type textout calls
  265. #define RFONT_TYPE_UNICODE 2
  266. #define RFONT_TYPE_HGLYPH 4
  267. #define RFONT_TYPE_MASK (RFONT_TYPE_UNICODE | RFONT_TYPE_HGLYPH)
  268. #define RFONT_CONTENT_METRICS 0
  269. #define RFONT_CONTENT_BITMAPS 1
  270. #define RFONT_CONTENT_PATHS 2
  271. #ifndef GDIFLAGS_ONLY // used for gdikdx
  272. class RFONT : public EXTFONTOBJ /* rfnt */
  273. {
  274. public:
  275. // Type information.
  276. ULONG iUnique; // uniqueness number
  277. // New type information
  278. FLONG flType; // Cache type -
  279. // * can't cache (RFONT_TYPE_NOCACHE) (aux mem)
  280. ULONG ulContent; // Type of contents
  281. // * Metrics only
  282. // * Metrics and bitmaps
  283. // * Metrics and paths
  284. // Font producer information.
  285. HDEV hdevProducer; // HDEV of the producer of font.
  286. BOOL bDeviceFont; // TRUE if realization of a device specific font
  287. // (can only get glyph metrics from such a font)
  288. // Font consumer information.
  289. HDEV hdevConsumer; // HDEV of the consumer of font.
  290. DHPDEV dhpdev; // device handle of PDEV of the consumer of font
  291. // not valid for display devices because of
  292. // dynamic mode changing
  293. // Physical font information (font source).
  294. PFE *ppfe; // pointer to physical font entry
  295. PFF *pPFF; // point to physical font file
  296. // Font transform information.
  297. FD_XFORM fdx; // N->D transform used to realize font
  298. COUNT cBitsPerPel; // number of bits per pel
  299. MATRIX mxWorldToDevice;// RFONT was realized with this DC xform
  300. // (translations removed) -- this is not
  301. // initialized for bitmapped fonts
  302. INT iGraphicsMode; // graphics mode used when
  303. // realizing the font
  304. EPOINTFL eptflNtoWScale; // baseline and ascender scaling factors --
  305. // these are accelerators for transforming
  306. // metrics from notional to world that are
  307. // colinear with the baseline (eptflScale.x)
  308. // and ascender (eptflScale.y).
  309. BOOL bNtoWIdent; // TRUE if Notional to World is identity
  310. // (ignoring translations)
  311. // DDI callback transform object. A reference to this EXFORMOBJ is passed
  312. // to the driver so that it can callback XFORMOBJ_ services for the notional
  313. // to device transform for this font.
  314. EXFORMOBJ xoForDDI; // notional to device EXFORMOBJ
  315. MATRIX mxForDDI; // xoForDDI's matrix
  316. // Device metrics information,
  317. // cashed here upon font realization for fast access
  318. FLONG flRealizedType;
  319. POINTL ptlUnderline1;
  320. POINTL ptlStrikeOut;
  321. POINTL ptlULThickness;
  322. POINTL ptlSOThickness;
  323. LONG lCharInc;
  324. FIX fxMaxAscent;
  325. FIX fxMaxDescent;
  326. FIX fxMaxExtent;
  327. POINTFIX ptfxMaxAscent;
  328. POINTFIX ptfxMaxDescent;
  329. ULONG cxMax; // width in pels of the widest glyph
  330. LONG lMaxAscent;
  331. LONG lMaxHeight;
  332. // these fields were formerly in REALIZE_EXTRA
  333. ULONG cyMax; // did not use to be here
  334. ULONG cjGlyphMax; // (cxMax + 7)/8 * cyMax, or at least it should be
  335. FD_XFORM fdxQuantized;
  336. LONG lNonLinearExtLeading;
  337. LONG lNonLinearIntLeading;
  338. LONG lNonLinearMaxCharWidth;
  339. LONG lNonLinearAvgCharWidth;
  340. // Assist transforms between logical and device coordinates.
  341. ULONG ulOrientation;
  342. EPOINTFL pteUnitBase;
  343. EFLOAT efWtoDBase;
  344. EFLOAT efDtoWBase;
  345. LONG lAscent;
  346. EPOINTFL pteUnitAscent;
  347. EFLOAT efWtoDAscent;
  348. EFLOAT efDtoWAscent;
  349. // This is a cached calculation that may change per output call.
  350. LONG lEscapement;
  351. EPOINTFL pteUnitEsc;
  352. EFLOAT efWtoDEsc;
  353. EFLOAT efDtoWEsc;
  354. EFLOAT efEscToBase;
  355. EFLOAT efEscToAscent;
  356. // FONTOBJ information
  357. // cached here upon font realization for fast access
  358. //FLONG flInfo;
  359. // Cache useful glyph handles.
  360. HGLYPH hgDefault;
  361. HGLYPH hgBreak;
  362. FIX fxBreak;
  363. FD_GLYPHSET *pfdg; // ptr to wchar-->hglyph map
  364. WCGP *wcgp; // ptr to wchar->pglyphdata map, if any
  365. FLONG flInfo;
  366. // PDEV linked list.
  367. INT cSelected; // number of times selected
  368. RFONTLINK rflPDEV; // doubly linked list links
  369. // PFF linked list.
  370. RFONTLINK rflPFF; // doubly linked list links
  371. // Font cache information.
  372. HSEMAPHORE hsemCache; // glyph cache semaphore
  373. CACHE cache; // glyph bitmap cache
  374. POINTL ptlSim; // for bitmap scaling
  375. BOOL bNeededPaths; // was this rfont realized for a path bracket
  376. // do device to world transforms in the same way win 31 does it instead of
  377. // doing it right. Used only in query calls, we must use correct values in
  378. // for the forward transforms to get the text layout correct
  379. EFLOAT efDtoWBase_31;
  380. EFLOAT efDtoWAscent_31;
  381. TMW_INTERNAL *ptmw; // cached text metrics
  382. // three fields added for USER
  383. LONG lMaxNegA;
  384. LONG lMaxNegC;
  385. LONG lMinWidthD;
  386. #ifdef FE_SB
  387. // EUDC information.
  388. BOOL bIsSystemFont; // is this fixedsys/system/or terminal
  389. FLONG flEUDCState; // EUDC state information.
  390. RFONT *prfntSystemTT; // system TT linked rfont
  391. RFONT *prfntSysEUDC; // pointer to System wide EUDC Rfont.
  392. RFONT *prfntDefEUDC; // pointer to Default EUDC Rfont.
  393. RFONT **paprfntFaceName; // facename links
  394. RFONT *aprfntQuickBuff[QUICK_FACE_NAME_LINKS];
  395. // quick buffer for face name and remote links
  396. BOOL bFilledEudcArray; // will be TRUE, the buffer is filled.
  397. ULONG ulTimeStamp; // timestamp for current link.
  398. UINT uiNumLinks; // number of linked fonts.
  399. BOOL bVertical; // vertical face flag.
  400. HSEMAPHORE hsemEUDC; // EUDC semaphore
  401. #endif
  402. };
  403. typedef RFONT *PRFONT;
  404. typedef PRFONT *PPRFONT;
  405. #define PRFNTNULL ((PRFONT) NULL)
  406. // PFO_TO_PRF
  407. //
  408. // Converts a FONTOBJ * to a RFONT * (assuming that the FONTOBJ is
  409. // contained within the RFONT).
  410. #define PFO_TO_PRF(pfo) ( (PRFONT) (((PBYTE) (pfo)) - offsetof(RFONT, fobj)) )
  411. // Typedefs for cached funtion pointers in RFONTOBJ.
  412. class RFONTOBJ;
  413. typedef RFONTOBJ *PRFONTOBJ;
  414. extern "C" {
  415. BOOL xInsertGlyphbitsRFONTOBJ(PRFONTOBJ pRfont, GLYPHDATA *pgd, ULONG bFlushOk);
  416. BOOL xInsertMetricsRFONTOBJ(PRFONTOBJ pRfont, GLYPHDATA **ppgd, WCHAR wc);
  417. BOOL xInsertMetricsPlusRFONTOBJ(PRFONTOBJ pRfont, GLYPHDATA **ppgd, WCHAR wc);
  418. VOID vRemoveAllInactiveRFONTs(PPDEV ppdev);
  419. };
  420. //
  421. // Mask of FONTOBJ simulation flags. Actually, this is a mask of everything
  422. // excluding the xxx_FONTTYPE flags (the ones defined for EnumFonts callback).
  423. //
  424. #define FO_SIM_MASK (FO_EM_HEIGHT | FO_SIM_BOLD | FO_SIM_ITALIC | FO_GRAY16 | FO_CLEARTYPE_X | FO_CLEARTYPE_Y)
  425. class PDEVOBJ;
  426. class PFFOBJ;
  427. // defined in common.h
  428. struct _WIDTHDATA;
  429. typedef _WIDTHDATA *PWIDTHDATA;
  430. /*********************************Class************************************\
  431. * class RFONTOBJ
  432. *
  433. * User object for realized fonts.
  434. *
  435. * Public Interface:
  436. *
  437. * RFONTOBJ () // constructor
  438. * RFONTOBJ (HRFONT) // constructor for existing rfont
  439. * ~RFONTOBJ () // destructor
  440. *
  441. * BOOL bValid () // validator
  442. * VOID vDeleteFromLFONT () // decr. LFONT count, maybe delete RFONT
  443. * BOOL bIFI () // check if IFI font
  444. * HANDLE hFont () // get font handle (HFC or HDFNT)
  445. * VOID vAddRefFromLFONT () // increment LFONT count
  446. * VOID vGetCache () // get cache semaphore
  447. * VOID vReleaseCache () // release cache semaphore
  448. * ULONG cGetGlyphs // get pointers to glyph information
  449. * BOOL bRealizeFont(DCOBJ&,HPFE) // realize the given font
  450. *
  451. * History:
  452. * 24-Sep-1991 -by- Gilman Wong [gilmanw]
  453. * Merged RFONT and CACHE (as well as the user objects). Out-of-line methods
  454. * that manipulate the font cache are still in CACHE.CXX.
  455. *
  456. * 25-Oct-1990 -by- Gilman Wong [gilmanw]
  457. * Wrote it.
  458. \**************************************************************************/
  459. class RFONTOBJ /* rfo */
  460. {
  461. public:
  462. PRFONT prfnt;
  463. //
  464. // These are the system-wide font cache parameters. Lets keep them
  465. // public in case anyone wants to use them.
  466. //
  467. static const GAMMA_TABLES gTables;
  468. BOOL bGetDEVICEMETRICS(PFD_DEVICEMETRICS pdevm);
  469. //
  470. // Constructors -- Lock the RFONT.
  471. //
  472. BOOL bInit(XDCOBJ &dco, BOOL bNeedPaths, FLONG flType);
  473. VOID vInit(XDCOBJ &dco, BOOL bNeedPaths, FLONG flType = RFONT_TYPE_UNICODE)
  474. {
  475. if ( bInit( dco, bNeedPaths, flType) )
  476. {
  477. vGetCache();
  478. }
  479. }
  480. RFONTOBJ() {prfnt = PRFNTNULL;}
  481. RFONTOBJ(PRFONT prfnt); // RFNTOBJ.CXX
  482. RFONTOBJ(XDCOBJ &dco, BOOL bNeedPaths, FLONG flType = RFONT_TYPE_UNICODE)
  483. {
  484. vInit(dco, bNeedPaths, flType);
  485. }
  486. // Not exactly a constructor, but it creates an RFONT based on the current
  487. // RFONT with a new N->D transform. The RFONT is active, but is not selected
  488. // automatically into the DC. It is the caller's responsibility to either
  489. // select into the DC (making it truly active) or calling vMakeInactive()
  490. // when the RFONTOBJ is no longer needed.
  491. BOOL bSetNewFDX(XDCOBJ &dco, FD_XFORM &fdx, FLONG flType);
  492. #ifdef FE_SB
  493. // EUDC functions.
  494. RFONT *prfntFont() { return( prfnt ); }
  495. RFONT *prfntSysEUDC() { return( prfnt->prfntSysEUDC ); }
  496. RFONT *prfntSystemTT() { return( prfnt->prfntSystemTT ); }
  497. RFONT *prfntDefEUDC() { return( prfnt->prfntDefEUDC ); }
  498. RFONT *prfntFaceName( UINT ui ) { return( prfnt->aprfntQuickBuff[ui] ); }
  499. UINT uiNumFaceNameLinks() { return( prfnt->uiNumLinks ); }
  500. HGLYPH hgDefault() { return( prfnt->hgDefault ); }
  501. VOID dtHelper(BOOL bReleaseEUDC2 = TRUE);
  502. VOID vInit(XDCOBJ&, PFE*, EUDCLOGFONT*, BOOL);
  503. GLYPHDATA *RFONTOBJ::pgdGetEudcMetricsPlus
  504. (
  505. WCHAR wc, RFONTOBJ* prfoBase
  506. );
  507. GLYPHDATA *RFONTOBJ::pgdGetEudcMetrics(WCHAR wc, RFONTOBJ* prfoBase);
  508. // Grabs global EUDC semaphore and validates prfntSysEUDC.
  509. VOID vInitEUDC(XDCOBJ &dco);
  510. VOID vInitEUDCRemote(XDCOBJ& dco);
  511. BOOL bInitSystemTT(XDCOBJ &dco);
  512. // Handles GetGlyphMetricsPlus for linked fonts
  513. GLYPHDATA *RFONTOBJ::wpgdGetLinkMetricsPlus
  514. (
  515. XDCOBJ *pdco,
  516. ESTROBJ *pto,
  517. WCHAR *pwc,
  518. WCHAR *pwcInit,
  519. COUNT c,
  520. BOOL *pbAccel,
  521. BOOL bGetBits // get bits not just metrics
  522. );
  523. BOOL bIsLinkedGlyph(WCHAR wc);
  524. BOOL bIsSystemTTGlyph(WCHAR wc)
  525. {
  526. return(prfnt->bIsSystemFont && IS_IN_SYSTEM_TT(wc));
  527. }
  528. BOOL bCheckEudcFontCaps( IFIOBJ& ifioEudc );
  529. // computes EUDCLOGFONT from base font
  530. GLYPHDATA *FindLinkedGlyphDataPlus
  531. (
  532. XDCOBJ *pdco,
  533. ESTROBJ *pto,
  534. WCHAR wc,
  535. COUNT index,
  536. COUNT c,
  537. BOOL *pbAccel,
  538. BOOL bSystemTT,
  539. BOOL bGetBits // get bits not just metrics
  540. );
  541. void ComputeEUDCLogfont(EUDCLOGFONT *pEUDCLogfont, XDCOBJ& dco);
  542. INT GetLinkedFontUFIs(XDCOBJ& dco, PUNIVERSAL_FONT_ID pufi, INT NumUFIs);
  543. #endif
  544. // Destructor -- Unlocks the RFONT
  545. ~RFONTOBJ ()
  546. {
  547. if (prfnt != (RFONT *) NULL )
  548. {
  549. #ifdef FE_SB
  550. if( prfnt->flEUDCState & (EUDC_INITIALIZED|TT_SYSTEM_INITIALIZED))
  551. {
  552. dtHelper();
  553. }
  554. #endif
  555. vReleaseCache();
  556. }
  557. }
  558. // bValid -- Returns TRUE if object was successfully locked
  559. BOOL bValid ()
  560. {
  561. return(prfnt != 0);
  562. }
  563. // ppff -- Return handle of PFF this RFONT was realized from
  564. PFF *pPFF () { return(prfnt->pPFF); }
  565. // ppfe -- Return handle of PFE this RFONT was realized from
  566. PFE *ppfe() {return(prfnt->ppfe);}
  567. // bDeviceFont -- Returns TRUE if this is a realization of a device
  568. // specific font. Such a font realization will be capable
  569. // of returning only glyph metrics. No bitmaps or outlines.
  570. BOOL bDeviceFont() { return prfnt->bDeviceFont; }
  571. // ppdevProducer/ -- Return handle of driver.
  572. HDEV hdevProducer () { return(prfnt->hdevProducer); }
  573. HDEV hdevConsumer () { return(prfnt->hdevConsumer); }
  574. // pfdx -- Return pointer to the notional to device font transform.
  575. FD_XFORM *pfdx() { return (&prfnt->fdx); }
  576. // iUnique -- Return the RFONT's uniqueness ID.
  577. ULONG iUnique () { return(pfo()->iUniq); }
  578. // pfo -- Return ptr to FONTOBJ.
  579. FONTOBJ *pfo() { return(&prfnt->fobj); }
  580. // kill driver realization of the font, i.e. "FONT CONTEXT" in the old lingo.
  581. // Method calling DrvDestroyFont before RFONT is killed itself.
  582. VOID vDestroyFont()
  583. {
  584. PFEOBJ pfeo(ppfe());
  585. PDEVOBJ pdevobj(prfnt->hdevProducer);
  586. // free pfdg
  587. pfeo.vFreepfdg();
  588. // If the driver does not export the DrvDestroyFont call, we won't
  589. // bother calling it. Otherwise, do it
  590. if (PPFNVALID(pdevobj, DestroyFont))
  591. {
  592. pdevobj.DestroyFont(pfo());
  593. }
  594. }
  595. // flInfo -- Return flInfo flags.
  596. FLONG flInfo() { return(prfnt->flInfo); }
  597. // bDelete -- Removes an RFONT
  598. BOOL RFONTOBJ::bDeleteRFONT ( // RFNTOBJ.CXX
  599. PDEVOBJ *ppdo,
  600. PFFOBJ *ppffo
  601. );
  602. // vGetCache -- Claims the cache semaphore
  603. VOID vGetCache ()
  604. {
  605. GreAcquireSemaphore(prfnt->hsemCache);
  606. }
  607. // vReleaseCache -- Releases the cache semaphore
  608. VOID vReleaseCache ()
  609. {
  610. if ( prfnt->cache.pjAuxCacheMem != (PBYTE) NULL )
  611. {
  612. VFREEMEM((PVOID) prfnt->cache.pjAuxCacheMem);
  613. prfnt->cache.cjAuxCacheMem = 0;
  614. prfnt->cache.pjAuxCacheMem = (PBYTE) NULL;
  615. }
  616. GreReleaseSemaphore(prfnt->hsemCache);
  617. }
  618. // Cache Access methods
  619. // bGetGlyphMetrics - Get just the metrics - for GetCharWidths, GetTextExtent
  620. BOOL bGetGlyphMetrics(COUNT c,
  621. GLYPHPOS *pgp,
  622. WCHAR *pwc,
  623. XDCOBJ *pdco = (XDCOBJ *)NULL,
  624. ESTROBJ *pto = (ESTROBJ *)NULL
  625. );
  626. // bGetGlyphMetricsPlus - for ExtTextOut and relatives
  627. BOOL bGetGlyphMetricsPlus(COUNT c,
  628. GLYPHPOS *pgp,
  629. WCHAR *pwc,
  630. BOOL *pbAccel,
  631. XDCOBJ *pdco = (XDCOBJ *)NULL,
  632. ESTROBJ *pto = (ESTROBJ *)NULL)
  633. ;
  634. GPRUN * gprunFindRun(WCHAR wc);
  635. // cGetGlyphData - for STROBJ_bEnum
  636. COUNT cGetGlyphData(COUNT c, GLYPHPOS *pgp)
  637. {
  638. ASSERTGDI(prfnt->wcgp != NULL, "cGetGlyphData: wcgp == NULL\n");
  639. if (prfnt->flType & RFONT_TYPE_NOCACHE)
  640. return cGetGlyphDataLookaside(c, pgp);
  641. else
  642. return cGetGlyphDataCache(c, pgp);
  643. };
  644. BOOL bGetWidthTable(
  645. XDCOBJ& dco,
  646. ULONG cSpecial, // Count of special chars.
  647. WCHAR *pwc, // Pointer to UNICODE text codepoints.
  648. ULONG cwc, // Count of chars.
  649. USHORT *psWidth // Width table (returned).
  650. );
  651. BOOL bGetWidthData(PWIDTHDATA pwd, XDCOBJ &dco);
  652. COUNT cGetGlyphDataLookaside(COUNT c, GLYPHPOS *pgp);
  653. COUNT cGetGlyphDataCache(COUNT c, GLYPHPOS *pgp);
  654. BOOL bTextExtent // TEXTGDI.CXX
  655. (
  656. #ifdef FE_SB
  657. XDCOBJ& dco,
  658. #endif
  659. LPWSTR pwsz,
  660. int cc,
  661. #ifdef FE_SB
  662. LONG lEsc,
  663. #endif
  664. LONG lExtra,
  665. LONG lBreakExtra,
  666. LONG cBreak,
  667. UINT fl,
  668. SIZE *psizl
  669. );
  670. BOOL bInsertMetrics( GLYPHDATA **ppgd, WCHAR wc)
  671. {
  672. if (prfnt->wcgp == NULL)
  673. {
  674. if (!bAllocateCache())
  675. {
  676. return(FALSE);
  677. }
  678. }
  679. return xInsertMetricsRFONTOBJ(this, ppgd, wc);
  680. }
  681. BOOL bInsertMetricsPlus( GLYPHDATA **ppgd, WCHAR wc)
  682. {
  683. if (prfnt->wcgp == NULL)
  684. {
  685. if (!bAllocateCache())
  686. {
  687. return(FALSE);
  688. }
  689. }
  690. return xInsertMetricsPlusRFONTOBJ(this, ppgd, wc);
  691. }
  692. BOOL bInsertMetricsPlusPath( GLYPHDATA **ppgd, WCHAR wc);
  693. BOOL bInsertGlyphbits( GLYPHDATA *pgd, ULONG bFlushOk)
  694. {
  695. if (prfnt->wcgp == NULL)
  696. {
  697. if (!bAllocateCache())
  698. {
  699. return(FALSE);
  700. }
  701. }
  702. return xInsertGlyphbitsRFONTOBJ(this, pgd, bFlushOk);
  703. }
  704. BOOL bInsertGlyphbitsPath( GLYPHDATA *pgd, ULONG bFlushOk);
  705. BOOL bInsertGlyphbitsLookaside( GLYPHPOS *pgp, ULONG imode);
  706. BOOL bInsertPathLookaside( GLYPHPOS *pgp, BOOL bFlatten = TRUE);
  707. BOOL bCheckMetricsCache();
  708. VOID *pgbCheckGlyphCache(SIZE_T cjNeeded);
  709. GLYPHDATA *pgdDefault()
  710. {
  711. //
  712. // For the FE builds it looks as though this will get
  713. // called in bGetWidthData on many fonts. It would be
  714. // good to find a way to either not do this or change
  715. // the code to not have to allocate the cache to get
  716. // this info.
  717. //
  718. if (prfnt->wcgp == NULL)
  719. {
  720. if (!bAllocateCache())
  721. {
  722. return(FALSE);
  723. }
  724. }
  725. if ( prfnt->wcgp->pgdDefault == NULL )
  726. {
  727. WCHAR wc;
  728. if (prfnt->flType & RFONT_TYPE_UNICODE)
  729. wc = prfnt->ppfe->pifi->wcDefaultChar;
  730. else
  731. wc = (WCHAR)prfnt->hgDefault;
  732. (void)bInsertMetricsPlus(&(prfnt->wcgp->pgdDefault),wc);
  733. }
  734. return prfnt->wcgp->pgdDefault;
  735. }
  736. #ifdef LANGPACK
  737. UINT rfiTechnology()
  738. {
  739. if(prfnt->ppfe->pifi->flInfo & FM_INFO_TECH_BITMAP)
  740. {
  741. return(FRINFO_BITMAP);
  742. }
  743. else if(prfnt->ppfe->pifi->flInfo & FM_INFO_TECH_STROKE)
  744. {
  745. return(FRINFO_VECTOR);
  746. }
  747. else
  748. {
  749. return(FRINFO_OTHER);
  750. }
  751. }
  752. #endif
  753. // chglyGetAllHandles -- returns count of HGLYPHs and copies them into
  754. // buffer if phgly is not NULL.
  755. COUNT chglyGetAllHandles (PHGLYPH phgly);
  756. // hgXlat - translate a char to an HGLYPH
  757. HGLYPH hgXlat(WCHAR wc)
  758. {
  759. HGLYPH hg;
  760. vXlatGlyphArray(&wc, 1, & hg);
  761. return hg;
  762. }
  763. VOID vXlatGlyphArray(WCHAR *pwc,UINT cwc,HGLYPH *phg, DWORD iMode = 0, BOOL bSubset = FALSE);
  764. VOID vFixUpGlyphIndices(USHORT *pgi, UINT cwc);
  765. void pfdg(FD_GLYPHSET *); // rfntxlat.cxx
  766. PFD_GLYPHSET pfdg() {return(prfnt->pfdg); }
  767. // set/get graphics mode used in realizing this font:
  768. INT iGraphicsMode() {return(prfnt->iGraphicsMode);}
  769. INT iGraphicsMode(INT i) {return(prfnt->iGraphicsMode = i);}
  770. // vGetInfo -- Return FONTINFO structure for this font.
  771. VOID vGetInfo ( // RFNTOBJ.CXX
  772. PFONTINFO pfi); // pointer to FONTINFO buffer
  773. // vSetNotionalToDevice -- Set EXFORMOBJ to the Notional to Device transform.
  774. VOID vSetNotionalToDevice ( // RFNTOBJ.CXX
  775. EXFORMOBJ &xfo // set the transform in here
  776. );
  777. // bSetNotionalToWorld -- Set EXFORMOBJ to the Notional to World transform.
  778. BOOL bSetNotionalToWorld (
  779. EXFORMOBJ &xoDToW, // Device to World transform
  780. EXFORMOBJ &xo // set this transform
  781. );
  782. // efNtoWScaleBaseline -- Return the Notional to World scaling factors
  783. // for vectors in the baseline direction.
  784. EFLOAT efNtoWScaleBaseline() {return(prfnt->eptflNtoWScale.x);}
  785. // efNtoWScaleAscender -- Return the Notional to World scaling factors
  786. // for vectors in the ascender direction.
  787. EFLOAT efNtoWScaleAscender() {return(prfnt->eptflNtoWScale.y);}
  788. // bNtoWIdentity -- Return TRUE if Notional to World transform is
  789. // identity (ignoring transforms).
  790. BOOL bNtoWIdentity() {return(prfnt->bNtoWIdent);}
  791. // methods to access devmetrics fields
  792. FLONG flRealizedType() {return(prfnt->flRealizedType );}
  793. POINTL& ptlUnderline1() {return(prfnt->ptlUnderline1 );}
  794. POINTL& ptlStrikeOut() {return(prfnt->ptlStrikeOut );}
  795. POINTL& ptlULThickness() {return(prfnt->ptlULThickness );}
  796. POINTL& ptlSOThickness() {return(prfnt->ptlSOThickness );}
  797. ULONG cxMax() {return(prfnt->cxMax );}
  798. LONG lCharInc() {return(prfnt->lCharInc);}
  799. FIX fxMaxAscent() {return(prfnt->fxMaxAscent);}
  800. FIX fxMaxDescent() {return(prfnt->fxMaxDescent);}
  801. FIX fxMaxExtent() {return(prfnt->fxMaxExtent);}
  802. POINTFIX& ptfxMaxAscent() {return(prfnt->ptfxMaxAscent);}
  803. POINTFIX& ptfxMaxDescent() {return(prfnt->ptfxMaxDescent);}
  804. LONG lMaxAscent() {return(prfnt->lMaxAscent);}
  805. LONG lMaxHeight() {return(prfnt->lMaxHeight);}
  806. LONG lOverhang();
  807. LONG lNonLinearExtLeading() {return(prfnt->lNonLinearExtLeading);}
  808. LONG lNonLinearIntLeading() {return(prfnt->lNonLinearIntLeading);}
  809. LONG lNonLinearMaxCharWidth() {return(prfnt->lNonLinearMaxCharWidth);}
  810. LONG lNonLinearAvgCharWidth() {return(prfnt->lNonLinearAvgCharWidth);}
  811. // Assist transforms between logical and device coordinates.
  812. EPOINTFL& pteUnitBase() {return(prfnt->pteUnitBase);}
  813. EFLOAT& efWtoDBase() {return(prfnt->efWtoDBase);}
  814. EFLOAT& efDtoWBase() {return(prfnt->efDtoWBase);}
  815. EPOINTFL& pteUnitAscent() {return(prfnt->pteUnitAscent);}
  816. EFLOAT& efWtoDAscent() {return(prfnt->efWtoDAscent);}
  817. EFLOAT& efDtoWAscent() {return(prfnt->efDtoWAscent);}
  818. EFLOAT& efDtoWBase_31() {return(prfnt->efDtoWBase_31);}
  819. EFLOAT& efDtoWAscent_31() {return(prfnt->efDtoWAscent_31);}
  820. // bCalcLayoutUnits - Initializes the above WtoD and DtoW fields.
  821. // Relies on pteUnitBase and pteUnitAscent being set.
  822. BOOL bCalcLayoutUnits(XDCOBJ *pdco);
  823. // ulSimpleOrientation - Looks at the pteUnitBase and transform and
  824. // tries to calculate an orientation which is a
  825. // multiple of 90 degrees.
  826. ULONG ulSimpleOrientation(XDCOBJ *pdco);
  827. BOOL bCalcEscapementP(EXFORMOBJ& xo,LONG lEsc);
  828. BOOL bCalcEscapement(EXFORMOBJ& xo,LONG lEsc)
  829. {
  830. return
  831. (
  832. (lEsc == prfnt->lEscapement) ? TRUE
  833. : bCalcEscapementP(xo,lEsc)
  834. );
  835. }
  836. EPOINTFL& pteUnitEsc() {return(prfnt->pteUnitEsc);}
  837. EFLOAT& efWtoDEsc() {return(prfnt->efWtoDEsc);}
  838. EFLOAT& efDtoWEsc() {return(prfnt->efDtoWEsc);}
  839. EFLOAT& efEscToBase() {return(prfnt->efEscToBase);}
  840. EFLOAT& efEscToAscent() {return(prfnt->efEscToAscent);}
  841. // Get cached text metrics
  842. TMW_INTERNAL *ptmw() {return(prfnt->ptmw);}
  843. VOID ptmwSet( TMW_INTERNAL *ptmw_ ) { prfnt->ptmw = ptmw_; }
  844. // Get useful HGLYPHs.
  845. HGLYPH hgBreak() {return(prfnt->hgBreak);}
  846. FIX fxBreak() {return(prfnt->fxBreak);}
  847. // ulOrientation -- Returns a cached copy of the LOGFONT's orientation.
  848. ULONG ulOrientation() {return(prfnt->ulOrientation);}
  849. // bPathFont -- Is this a path font?
  850. BOOL bPathFont() {return(prfnt->ulContent & FO_PATHOBJ);}
  851. // vDeleteCache -- Delete the CACHE from existence.
  852. VOID vDeleteCache (); // CACHE.CXX
  853. VOID vPrintFD_GLYPHSET(); // RFNTOBJ.CXX
  854. // bInitCache -- Initialize the cache
  855. BOOL bInitCache(FLONG flType); // CACHE.CXX
  856. BOOL bAllocateCache(RFONTOBJ* prfoBase = NULL); // CACHE.CXX
  857. // bFindRFONT() -- find the realization if it exists on
  858. // the list on the pdev.
  859. private:
  860. BOOL bMatchRealization(
  861. PFD_XFORM pfdx,
  862. FLONG flSim,
  863. ULONG ulStyleHt,
  864. EXFORMOBJ * pxoWtoD,
  865. PFE * ppfe,
  866. BOOL bNeedPaths,
  867. INT iGraphicsMode,
  868. BOOL bSmallMetricsOk,
  869. FLONG flType
  870. );
  871. public:
  872. BOOL bFindRFONT(
  873. PFD_XFORM pfdx,
  874. FLONG fl,
  875. ULONG ulStyleHt,
  876. PDEVOBJ& pdo,
  877. EXFORMOBJ *pxoWtoD,
  878. PFE *ppfe,
  879. BOOL bNeedPaths,
  880. int iGraphicsMode,
  881. BOOL bSmallMetricsOk,
  882. FLONG flType
  883. );
  884. // bMatchFDXForm -- Is pfdx identical to current font xform?
  885. BOOL bMatchFDXForm(FD_XFORM *pfdx)
  886. {
  887. return(!memcmp((PBYTE)pfdx, (PBYTE)&prfnt->fdx,
  888. sizeof(FD_XFORM)));
  889. }
  890. // bRealizeFont -- Initializer; for IFI, calls driver to realize
  891. // font represented by PFE.
  892. BOOL bRealizeFont(
  893. XDCOBJ *pdco, // realize font for this DC
  894. PDEVOBJ *ppdo, // realize font for this PDEV
  895. ENUMLOGFONTEXDVW *pelfw, // font wish list (in logical coords)
  896. PFE *ppfe, // realize this font face
  897. PFD_XFORM pfdx, // font xform (Notional to Device)
  898. POINTL* const pptlSim, // for bitmap scaling simulations
  899. FLONG fl, // these two really modify the xform
  900. ULONG ulStyleHt, // these two really modify the xform
  901. BOOL bNeedPaths,
  902. BOOL bSmallMetricsOk,
  903. FLONG flType
  904. );
  905. POINTL *pptlSim() {return(&(prfnt->ptlSim));}
  906. // need public for journaling
  907. VOID vMakeInactive();
  908. #ifdef FE_SB
  909. BOOL bMakeInactiveHelper(PRFONT *pprfnt);
  910. #endif
  911. // added for journaling
  912. VOID vGetFDX(PFD_XFORM pfdx)
  913. {
  914. *pfdx = prfnt->fdx;
  915. }
  916. VOID vInit() {prfnt = (PRFONT)NULL; }
  917. VOID vFlushCache();
  918. VOID vPromote();
  919. VOID vPromoteIFI();
  920. BOOL bSmallMetrics()
  921. {
  922. return(prfnt->cache.bSmallMetrics);
  923. }
  924. VOID vSmallMetricsSet( BOOL bSmallMetrics )
  925. {
  926. prfnt->cache.bSmallMetrics = bSmallMetrics;
  927. }
  928. // prflPFF -- Returns a pointer to RFONTLINK for the PFF list.
  929. // prflPDEV -- Returns a pointer to RFONTLINK for the PDEV list.
  930. PRFONTLINK prflPFF() { return &(prfnt->rflPFF); }
  931. PRFONTLINK prflPDEV() { return &(prfnt->rflPDEV); }
  932. // vInsert -- Insert this RFONT onto the head of an RFONT doubly linked list.
  933. VOID vInsert ( // RFNTOBJ.CXX
  934. PPRFONT pprfntHead,
  935. RFL_TYPE rflt
  936. );
  937. // vRemove -- Remove this RFONT from an RFONT doubly linked list.
  938. VOID vRemove ( // RFNTOBJ.CXX
  939. PPRFONT pprfntHead,
  940. RFL_TYPE rflt
  941. );
  942. // bActive -- Returns TRUE if an active RFONT. Font is active is it is
  943. // selected into one or more DCs.
  944. BOOL bActive() { return (prfnt->cSelected != 0); }
  945. // vUFI Returns the UFI of the file/face used to realize this font
  946. void vUFI( PUNIVERSAL_FONT_ID pufi ) { *pufi = *(&(prfnt->ppfe->ufi)); }
  947. // Get realization information
  948. BOOL GetRealizationInfo(PREALIZATION_INFO pri)
  949. {
  950. PFFOBJ pffo (pPFF());
  951. pri->uFontTechnology = rfiTechnology();
  952. pri->uRealizationID = iUnique();
  953. pri->uFontFileID = pffo.uUniqueness();
  954. return TRUE;
  955. }
  956. // font info
  957. #ifdef INCLUDED_IFIOBJ_HXX
  958. BOOL bArbXforms()
  959. {
  960. return(BARBXFORMS(prfnt->flInfo));
  961. }
  962. BOOL bContinuousScaling()
  963. {
  964. return(BCONTINUOUSSCALING(prfnt->flInfo));
  965. }
  966. BOOL bReturnsOutlines()
  967. {
  968. ASSERTGDI(
  969. (prfnt->flInfo & (FM_INFO_RETURNS_OUTLINES | FM_INFO_RETURNS_STROKES)) !=
  970. (FM_INFO_RETURNS_OUTLINES | FM_INFO_RETURNS_STROKES),
  971. "Font claims to return both stokes and outlines"
  972. );
  973. return(BRETURNSOUTLINES(prfnt->flInfo));
  974. }
  975. #endif
  976. void vChangeiTTUniq(FONTFILE_PRINTKVIEW *pPrintKview);
  977. void PreTextOut(XDCOBJ& dco);
  978. void PostTextOut(XDCOBJ& dco);
  979. char* pchTranslate( char *pch );
  980. PVOID pvFile(ULONG *pcjFile);
  981. BYTE *pjTable( ULONG ulTag, ULONG *pcjTable );
  982. ULONG_PTR iFile()
  983. {
  984. return( prfnt->fobj.iFile );
  985. }
  986. PVOID pvFileUMPD(ULONG *pcjFile, PVOID *ppBase);
  987. CHAR* pchTranslateUMPD(CHAR *pch, PVOID *ppBase);
  988. #if DBG
  989. void VerifyCacheSemaphore();
  990. #endif
  991. };
  992. typedef RFONTOBJ *PRFONTOBJ;
  993. /*********************************Class************************************\
  994. * class RFONTTMPOBJ : public RFONTOBJ
  995. *
  996. * Temporary rfont object used when traversing rfont lists
  997. *
  998. * History:
  999. * 29-Oct-1990 -by- Gilman Wong [gilmanw]
  1000. * Wrote it.
  1001. \**************************************************************************/
  1002. class RFONTTMPOBJ : public RFONTOBJ
  1003. {
  1004. public:
  1005. RFONTTMPOBJ() {prfnt = PRFNTNULL;}
  1006. VOID vInit(PRFONT _prfnt)
  1007. {
  1008. prfnt = _prfnt;
  1009. }
  1010. RFONTTMPOBJ(PRFONT _prfnt)
  1011. {
  1012. prfnt = _prfnt;
  1013. }
  1014. ~RFONTTMPOBJ()
  1015. {
  1016. prfnt = (PRFONT)NULL;
  1017. }
  1018. };
  1019. #if DBG
  1020. class RFONTTESTOBJ : public RFONTOBJ
  1021. {
  1022. public:
  1023. RFONTTESTOBJ(PRFONT _prfnt)
  1024. {
  1025. prfnt = _prfnt;
  1026. }
  1027. ~RFONTTESTOBJ()
  1028. {
  1029. prfnt = (PRFONT)NULL;
  1030. }
  1031. };
  1032. #endif
  1033. extern BOOL bInitRFONT();
  1034. // A tiny hack to allow easy access to the GLYPHDATA in GDI.
  1035. class EGLYPHPOS : public _GLYPHPOS
  1036. {
  1037. public:
  1038. GLYPHDATA *pgd() {return((GLYPHDATA *) pgdf);}
  1039. };
  1040. #define CJ_CTGD(cx,cy) (ALIGN4(offsetof(GLYPHBITS,aj)) + ALIGN4((cx) * (cy)))
  1041. BOOL SpTextOut(
  1042. SURFOBJ* pso,
  1043. STROBJ* pstro,
  1044. FONTOBJ* pfo,
  1045. CLIPOBJ* pco,
  1046. RECTL* prclExtra,
  1047. RECTL* prclOpaque,
  1048. BRUSHOBJ* pboFore,
  1049. BRUSHOBJ* pboOpaque,
  1050. POINTL* pptlOrg,
  1051. MIX mix);
  1052. extern ULONG gulGamma;
  1053. #endif // GDIFLAGS_ONLY used for gdikdx