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.

121 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 1996 - 1999 Microsoft Corporation
  3. Module Name:
  4. fmtxtout.h
  5. Abstract:
  6. Unidrv Textout related info header file.
  7. Environment:
  8. Windows NT Unidrv driver
  9. Revision History:
  10. 05-28-97 -eigos-
  11. Created
  12. dd-mm-yy -author-
  13. description
  14. --*/
  15. #ifndef _FMTXTOUT_
  16. #define _FMTXTOUT_
  17. // This is a forward declaration to build.
  18. // Actual definition of FONTMAP is in fontmap.h
  19. // PDLGLYPH is in download.h
  20. //
  21. typedef struct _FONTMAP FONTMAP;
  22. typedef struct _DLGLYPH *PDLGLYPH;
  23. /*
  24. * WHITE TEXT: on LJ III and later printers, it is possible to
  25. * print white text. Doing this requires sending the white text
  26. * after the graphics. TO do this, we store the white text details
  27. * in the following structures, then replay them after sending
  28. * all the graphics.
  29. */
  30. /*
  31. * First is a structure to determine which glyph and where to put it.
  32. */
  33. typedef struct
  34. {
  35. HGLYPH hg; /* The glyph's handle -> the glyph */
  36. POINTL ptl; /* It's position */
  37. } GLYPH;
  38. /*
  39. * When some white text appears in DrvTextOut(), we create one of these
  40. * structures, and add it to the list of such. At the end of rendering,
  41. * these are then processed using the normal sort of code in DrvTextOut().
  42. *
  43. * NOTE that the xfo field is appropriate to scalable fonts or fonts on a
  44. * printer that can do font rotations relative to the graphics.
  45. */
  46. typedef struct _WHITETEXT
  47. {
  48. struct _WHITETEXT *next; // Next in list, NULL on last
  49. short sCount; // Number of entries
  50. PVOID pvColor; // Color info - For convenience
  51. int iFontId; // Which font
  52. DWORD dwAttrFlags; // Font attribute flags, italic/bold
  53. FLONG flAccel; // STROBJ.flAccel
  54. GLYPHPOS *pgp; // Pointer to a PGLYPHPOS
  55. PDLGLYPH *apdlGlyph; // Download Glyph array. Free in BPlayWhiteText.
  56. INT iRot; // Text Rotation Angle
  57. FLOATOBJ eXScale; // X Scale factor
  58. FLOATOBJ eYScale; // Y Scale factor
  59. RECTL rcClipRgn; // Clipping region of the text(for banding)
  60. IFIMETRICS *pIFI;
  61. } WHITETEXT;
  62. //
  63. // Processing textout calls requires access to a considerable number
  64. // of parameters. To simplify function calls, this data is accumulated
  65. // in one structure which is then passed around. Here is that structure.
  66. //
  67. //
  68. typedef struct _TO_DATA
  69. {
  70. PDEV *pPDev; // The PDEV of interes
  71. FONTMAP *pfm; // Relevant font data
  72. FONTOBJ *pfo; // FONTOBJ
  73. FLONG flAccel; // STROBJ.flAccel
  74. GLYPHPOS *pgp; // Glyph data returned from the engine.
  75. PDLGLYPH *apdlGlyph; // Download Glyph array. Free
  76. // this at the end of Drvtxtout.
  77. PHGLYPH phGlyph; // For font substitution.
  78. WHITETEXT *pwt; // Current WHITETEXT
  79. PVOID pvColor; // Color of the Brush to use
  80. DWORD cGlyphsToPrint; // Number of glyph stored in pgp
  81. DWORD dwCurrGlyph; // Index of the current Glyph to print.
  82. // This is wrt all glyphs in Textout.
  83. INT iFace; // The font index to use
  84. INT iSubstFace; // The font index to substutite.
  85. INT iRot; // 90 deg multiple of font rotation.
  86. DWORD dwAttrFlags; // Font attribute
  87. DWORD flFlags; // Various Flags.
  88. POINTL ptlFirstGlyph; // Position of the first Glyph in pgp.
  89. } TO_DATA;
  90. #define TODFL_FIRST_GLYPH_POS_SET 0x00000001 // Cursor is set to first glyph
  91. #define TODFL_DEFAULT_PLACEMENT 0x00000002 // For Default placement
  92. #define TODFL_TTF_PARTIAL_CLIPPING 0x00000004 // For partial clipping
  93. #define TODFL_FIRST_ENUMRATION 0x00000008 // For first enum of glyphs
  94. #endif // !_FMTXTOUT_