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.

207 lines
8.0 KiB

  1. /*++ BUILD Version: 0002 // Increment this if a change has global effects
  2. Copyright (c) 1990-2003 Microsoft Corporation
  3. Module Name:
  4. plotgpc.h
  5. Abstract:
  6. This module contains the plotter characterization data definition
  7. Author:
  8. 10-Nov-1993 Wed 02:04:24 created
  9. 18-Mar-1994 Fri 14:00:14 updated
  10. Adding PLOTF_RTL_NO_DPI_XY, PLOTF_RTLMONO_NO_CID and
  11. PLOTF_RTLMONO_FIXPAL flags
  12. [Environment:]
  13. GDI Device Driver - PLOTTER.
  14. [Notes:]
  15. Revision History:
  16. --*/
  17. #ifndef _PLOTGPC_
  18. #define _PLOTGPC_
  19. #define PLOTF_RASTER 0x00000001
  20. #define PLOTF_COLOR 0x00000002
  21. #define PLOTF_BEZIER 0x00000004
  22. #define PLOTF_RASTERBYTEALIGN 0x00000008
  23. #define PLOTF_PUSHPOPPAL 0x00000010
  24. #define PLOTF_TRANSPARENT 0x00000020
  25. #define PLOTF_WINDINGFILL 0x00000040
  26. #define PLOTF_ROLLFEED 0x00000080
  27. #define PLOTF_PAPERTRAY 0x00000100
  28. #define PLOTF_NO_BMP_FONT 0x00000200
  29. #define PLOTF_RTLMONOENCODE_5 0x00000400
  30. #define PLOTF_RTL_NO_DPI_XY 0x00000800
  31. #define PLOTF_RTLMONO_NO_CID 0x00001000
  32. #define PLOTF_RTLMONO_FIXPAL 0x00002000
  33. #define PLOTF_ALL_FLAGS 0x00003fff
  34. #define PLOTGPC_ID 'tolP'
  35. #define PLOTGPC_VERSION 0x010a
  36. #define ROP_LEVEL_0 0
  37. #define ROP_LEVEL_1 1
  38. #define ROP_LEVEL_2 2
  39. #define ROP_LEVEL_3 3
  40. #define ROP_LEVEL_MAX ROP_LEVEL_3
  41. #define MAX_SCALE_MAX 10000
  42. #define MAX_QUALITY_MAX 4
  43. #define MAX_PENPLOTTER_PENS 32
  44. //
  45. // The form data
  46. //
  47. typedef struct _FORMSRC {
  48. CHAR Name[CCHFORMNAME]; // Form name
  49. SIZEL Size; // cx/cy size in 1/1000mm
  50. RECTL Margin; // L/T/R/B margins in 1/1000mm
  51. } FORMSRC, *PFORMSRC;
  52. //
  53. // The pen plotter pen information
  54. //
  55. // Index R G B
  56. // ------------------------------
  57. // PC_IDX_WHITE 255 255 255
  58. // PC_IDX_BLACK 0 0 0
  59. // PC_IDX_RED 255 0 0
  60. // PC_IDX_GREEN 0 255 0
  61. // PC_IDX_YELLOW 255 255 0
  62. // PC_IDX_BLUE 0 0 255
  63. // PC_IDX_MAGENTA 255 0 255
  64. // PC_IDX_CYAN 0 255 255
  65. // PC_IDX_ORANGE 255 128 0
  66. // PC_IDX_BROWN 255 192 0
  67. // PC_IDX_VIOLET 128 0 255
  68. //
  69. #define PC_IDX_FIRST PC_IDX_WHITE
  70. #define PC_IDX_WHITE 0
  71. #define PC_IDX_BLACK 1
  72. #define PC_IDX_RED 2
  73. #define PC_IDX_GREEN 3
  74. #define PC_IDX_YELLOW 4
  75. #define PC_IDX_BLUE 5
  76. #define PC_IDX_MAGENTA 6
  77. #define PC_IDX_CYAN 7
  78. #define PC_IDX_ORANGE 8
  79. #define PC_IDX_BROWN 9
  80. #define PC_IDX_VIOLET 10
  81. #define PC_IDX_LAST PC_IDX_VIOLET
  82. #define PC_IDX_TOTAL (PC_IDX_LAST - PC_IDX_FIRST + 1)
  83. typedef struct _PENDATA {
  84. WORD ColorIdx;
  85. } PENDATA, *PPENDATA;
  86. //
  87. // Variable size definitions
  88. // Note: If you change any of these structures you have to make the appropriate
  89. // change in CopyPlotGPCFromPCD() in file readgpc.c
  90. //
  91. typedef struct _GPCVARSIZE {
  92. WORD Count; // Count of total structures
  93. WORD SizeEach; // Size of each structure
  94. LPVOID pData; // offset of data, fixed up at load
  95. } GPCVARSIZE, *PGPCVARSIZE;
  96. typedef struct _PLOTGPC {
  97. DWORD ID; // ID For checking
  98. DWORD Version; // Version number
  99. WORD cjThis; // size of PLOTGPC structure
  100. WORD SizeExtra; // extra size at end of structure
  101. BYTE DeviceName[CCHDEVICENAME]; // Device name
  102. SIZEL DeviceSize; // cx/cy in 1/1000 mm
  103. RECTL DeviceMargin; // L/T/R/B margins in 1/1000mm
  104. DWORD Flags; // PLOTF_xxxx flags
  105. DWORD PlotXDPI; // Pen Plotter DotPerInch in X
  106. DWORD PlotYDPI; // Pen Plotter DotPerInch in Y
  107. WORD RasterXDPI; // Raster DotPerInch in X
  108. WORD RasterYDPI; // Raster DotPerInch in Y
  109. WORD ROPLevel; // Raster Operation Level
  110. WORD MaxScale; // Scale in 1% increment 100 = 100%
  111. WORD MaxPens; // Maximum pens device has
  112. WORD MaxCopies; // Maximum copies device can handle
  113. WORD MaxPolygonPts; // Maximum polygon pt it can handle
  114. WORD MaxQuality; // Maximum avaliable quality
  115. SIZEL PaperTraySize; // Paper Tray Size
  116. COLORINFO ci; // Color Info structure
  117. DWORD DevicePelsDPI; // Real effective DPI for device
  118. DWORD HTPatternSize; // Halftone pattern size
  119. GPCVARSIZE InitString; // init string send during StartDoc
  120. GPCVARSIZE Forms; // Form supported (FORMSRC)
  121. GPCVARSIZE Pens; // Pen plotter pens' Data
  122. } PLOTGPC, *PPLOTGPC;
  123. /*
  124. * These structures represent the values on the .pcd files. They have the same
  125. * structure on both 32 bit and 64 bit machines. To achieve this, the pack (4)
  126. * directive is used. Also, no 64 bit quantities, like LPVOID, are used.
  127. */
  128. #pragma pack(push, 4)
  129. typedef struct _GPCVARSIZE_PCD {
  130. WORD Count; // Count of total structures
  131. WORD SizeEach; // Size of each structure
  132. DWORD pData; // offset of data, fixed up at load
  133. } GPCVARSIZE_PCD, *PGPCVARSIZE_PCD;
  134. typedef struct _PLOTGPC_PCD {
  135. DWORD ID; // ID For checking
  136. DWORD Version; // Version number
  137. WORD cjThis; // size of PLOTGPC_PCD structure
  138. WORD SizeExtra; // extra size at end of structure
  139. BYTE DeviceName[CCHDEVICENAME]; // Device name
  140. SIZEL DeviceSize; // cx/cy in 1/1000 mm
  141. RECTL DeviceMargin; // L/T/R/B margins in 1/1000mm
  142. DWORD Flags; // PLOTF_xxxx flags
  143. DWORD PlotXDPI; // Pen Plotter DotPerInch in X
  144. DWORD PlotYDPI; // Pen Plotter DotPerInch in Y
  145. WORD RasterXDPI; // Raster DotPerInch in X
  146. WORD RasterYDPI; // Raster DotPerInch in Y
  147. WORD ROPLevel; // Raster Operation Level
  148. WORD MaxScale; // Scale in 1% increment 100 = 100%
  149. WORD MaxPens; // Maximum pens device has
  150. WORD MaxCopies; // Maximum copies device can handle
  151. WORD MaxPolygonPts; // Maximum polygon pt it can handle
  152. WORD MaxQuality; // Maximum avaliable quality
  153. SIZEL PaperTraySize; // Paper Tray Size
  154. COLORINFO ci; // Color Info structure
  155. DWORD DevicePelsDPI; // Real effective DPI for device
  156. DWORD HTPatternSize; // Halftone pattern size
  157. GPCVARSIZE_PCD InitString; // init string send during StartDoc
  158. GPCVARSIZE_PCD Forms; // Form supported (FORMSRC)
  159. GPCVARSIZE_PCD Pens; // Pen plotter pens' Data
  160. } PLOTGPC_PCD, *PPLOTGPC_PCD;
  161. #pragma pack(pop)
  162. #define DWORD_ALIGNED(x) (((DWORD)x + 3) & (DWORD)~3)
  163. #endif