Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

1253 righe
55 KiB

  1. /**************************************************************************\
  2. *
  3. * Copyright (c) 1998-2000, Microsoft Corp. All Rights Reserved.
  4. *
  5. * Module Name:
  6. *
  7. * GdiplusEnums.h
  8. *
  9. * Abstract:
  10. *
  11. * Various enumeration types
  12. *
  13. \**************************************************************************/
  14. #ifndef _GDIPLUSENUMS_H
  15. #define _GDIPLUSENUMS_H
  16. //--------------------------------------------------------------------------
  17. // Default bezier flattening tolerance in device pixels.
  18. //--------------------------------------------------------------------------
  19. const float FlatnessDefault = 1.0f/4.0f;
  20. //--------------------------------------------------------------------------
  21. // Graphics and Container State cookies
  22. //--------------------------------------------------------------------------
  23. typedef UINT GraphicsState;
  24. typedef UINT GraphicsContainer;
  25. //--------------------------------------------------------------------------
  26. // Fill mode constants
  27. //--------------------------------------------------------------------------
  28. enum FillMode
  29. {
  30. FillModeAlternate, // 0
  31. FillModeWinding // 1
  32. };
  33. //--------------------------------------------------------------------------
  34. // Quality mode constants
  35. //--------------------------------------------------------------------------
  36. enum QualityMode
  37. {
  38. QualityModeInvalid = -1,
  39. QualityModeDefault = 0,
  40. QualityModeLow = 1, // for apps that need the best performance
  41. QualityModeHigh = 2 // for apps that need the best rendering quality
  42. };
  43. //--------------------------------------------------------------------------
  44. // Alpha compositing mode constants
  45. //--------------------------------------------------------------------------
  46. enum CompositingMode
  47. {
  48. CompositingModeSourceOver, // 0
  49. CompositingModeSourceCopy // 1
  50. };
  51. //--------------------------------------------------------------------------
  52. // Alpha compositing quality constants
  53. //--------------------------------------------------------------------------
  54. enum CompositingQuality
  55. {
  56. CompositingQualityInvalid = QualityModeInvalid,
  57. CompositingQualityDefault = QualityModeDefault,
  58. CompositingQualityHighSpeed = QualityModeLow,
  59. CompositingQualityHighQuality = QualityModeHigh,
  60. CompositingQualityGammaCorrected,
  61. CompositingQualityAssumeLinear
  62. };
  63. //--------------------------------------------------------------------------
  64. // Unit constants
  65. //--------------------------------------------------------------------------
  66. enum Unit
  67. {
  68. UnitWorld, // 0 -- World coordinate (non-physical unit)
  69. UnitDisplay, // 1 -- Variable -- for PageTransform only
  70. UnitPixel, // 2 -- Each unit is one device pixel.
  71. UnitPoint, // 3 -- Each unit is a printer's point, or 1/72 inch.
  72. UnitInch, // 4 -- Each unit is 1 inch.
  73. UnitDocument, // 5 -- Each unit is 1/300 inch.
  74. UnitMillimeter // 6 -- Each unit is 1 millimeter.
  75. };
  76. //--------------------------------------------------------------------------
  77. // MetafileFrameUnit
  78. //
  79. // The frameRect for creating a metafile can be specified in any of these
  80. // units. There is an extra frame unit value (MetafileFrameUnitGdi) so
  81. // that units can be supplied in the same units that GDI expects for
  82. // frame rects -- these units are in .01 (1/100ths) millimeter units
  83. // as defined by GDI.
  84. //--------------------------------------------------------------------------
  85. enum MetafileFrameUnit
  86. {
  87. MetafileFrameUnitPixel = UnitPixel,
  88. MetafileFrameUnitPoint = UnitPoint,
  89. MetafileFrameUnitInch = UnitInch,
  90. MetafileFrameUnitDocument = UnitDocument,
  91. MetafileFrameUnitMillimeter = UnitMillimeter,
  92. MetafileFrameUnitGdi // GDI compatible .01 MM units
  93. };
  94. //--------------------------------------------------------------------------
  95. // Coordinate space identifiers
  96. //--------------------------------------------------------------------------
  97. enum CoordinateSpace
  98. {
  99. CoordinateSpaceWorld, // 0
  100. CoordinateSpacePage, // 1
  101. CoordinateSpaceDevice // 2
  102. };
  103. //--------------------------------------------------------------------------
  104. // Various wrap modes for brushes
  105. //--------------------------------------------------------------------------
  106. enum WrapMode
  107. {
  108. WrapModeTile, // 0
  109. WrapModeTileFlipX, // 1
  110. WrapModeTileFlipY, // 2
  111. WrapModeTileFlipXY, // 3
  112. WrapModeClamp // 4
  113. };
  114. //--------------------------------------------------------------------------
  115. // Various hatch styles
  116. //--------------------------------------------------------------------------
  117. enum HatchStyle
  118. {
  119. HatchStyleHorizontal, // 0
  120. HatchStyleVertical, // 1
  121. HatchStyleForwardDiagonal, // 2
  122. HatchStyleBackwardDiagonal, // 3
  123. HatchStyleCross, // 4
  124. HatchStyleDiagonalCross, // 5
  125. HatchStyle05Percent, // 6
  126. HatchStyle10Percent, // 7
  127. HatchStyle20Percent, // 8
  128. HatchStyle25Percent, // 9
  129. HatchStyle30Percent, // 10
  130. HatchStyle40Percent, // 11
  131. HatchStyle50Percent, // 12
  132. HatchStyle60Percent, // 13
  133. HatchStyle70Percent, // 14
  134. HatchStyle75Percent, // 15
  135. HatchStyle80Percent, // 16
  136. HatchStyle90Percent, // 17
  137. HatchStyleLightDownwardDiagonal, // 18
  138. HatchStyleLightUpwardDiagonal, // 19
  139. HatchStyleDarkDownwardDiagonal, // 20
  140. HatchStyleDarkUpwardDiagonal, // 21
  141. HatchStyleWideDownwardDiagonal, // 22
  142. HatchStyleWideUpwardDiagonal, // 23
  143. HatchStyleLightVertical, // 24
  144. HatchStyleLightHorizontal, // 25
  145. HatchStyleNarrowVertical, // 26
  146. HatchStyleNarrowHorizontal, // 27
  147. HatchStyleDarkVertical, // 28
  148. HatchStyleDarkHorizontal, // 29
  149. HatchStyleDashedDownwardDiagonal, // 30
  150. HatchStyleDashedUpwardDiagonal, // 31
  151. HatchStyleDashedHorizontal, // 32
  152. HatchStyleDashedVertical, // 33
  153. HatchStyleSmallConfetti, // 34
  154. HatchStyleLargeConfetti, // 35
  155. HatchStyleZigZag, // 36
  156. HatchStyleWave, // 37
  157. HatchStyleDiagonalBrick, // 38
  158. HatchStyleHorizontalBrick, // 39
  159. HatchStyleWeave, // 40
  160. HatchStylePlaid, // 41
  161. HatchStyleDivot, // 42
  162. HatchStyleDottedGrid, // 43
  163. HatchStyleDottedDiamond, // 44
  164. HatchStyleShingle, // 45
  165. HatchStyleTrellis, // 46
  166. HatchStyleSphere, // 47
  167. HatchStyleSmallGrid, // 48
  168. HatchStyleSmallCheckerBoard, // 49
  169. HatchStyleLargeCheckerBoard, // 50
  170. HatchStyleOutlinedDiamond, // 51
  171. HatchStyleSolidDiamond, // 52
  172. HatchStyleTotal, // must be after all unique hatch styles
  173. HatchStyleLargeGrid = HatchStyleCross, // 4 an alias for the cross style
  174. HatchStyleMin = HatchStyleHorizontal,
  175. HatchStyleMax = HatchStyleTotal - 1,
  176. };
  177. //--------------------------------------------------------------------------
  178. // Dash style constants
  179. //--------------------------------------------------------------------------
  180. enum DashStyle
  181. {
  182. DashStyleSolid, // 0
  183. DashStyleDash, // 1
  184. DashStyleDot, // 2
  185. DashStyleDashDot, // 3
  186. DashStyleDashDotDot, // 4
  187. DashStyleCustom // 5
  188. };
  189. //--------------------------------------------------------------------------
  190. // Dash cap constants
  191. //--------------------------------------------------------------------------
  192. enum DashCap
  193. {
  194. DashCapFlat = 0,
  195. DashCapRound = 2,
  196. DashCapTriangle = 3
  197. };
  198. //--------------------------------------------------------------------------
  199. // Line cap constants (only the lowest 8 bits are used).
  200. //--------------------------------------------------------------------------
  201. enum LineCap
  202. {
  203. LineCapFlat = 0,
  204. LineCapSquare = 1,
  205. LineCapRound = 2,
  206. LineCapTriangle = 3,
  207. LineCapNoAnchor = 0x10, // corresponds to flat cap
  208. LineCapSquareAnchor = 0x11, // corresponds to square cap
  209. LineCapRoundAnchor = 0x12, // corresponds to round cap
  210. LineCapDiamondAnchor = 0x13, // corresponds to triangle cap
  211. LineCapArrowAnchor = 0x14, // no correspondence
  212. LineCapCustom = 0xff, // custom cap
  213. LineCapAnchorMask = 0xf0 // mask to check for anchor or not.
  214. };
  215. //--------------------------------------------------------------------------
  216. // Custom Line cap type constants
  217. //--------------------------------------------------------------------------
  218. enum CustomLineCapType
  219. {
  220. CustomLineCapTypeDefault = 0,
  221. CustomLineCapTypeAdjustableArrow = 1
  222. };
  223. //--------------------------------------------------------------------------
  224. // Line join constants
  225. //--------------------------------------------------------------------------
  226. enum LineJoin
  227. {
  228. LineJoinMiter = 0,
  229. LineJoinBevel = 1,
  230. LineJoinRound = 2,
  231. LineJoinMiterClipped = 3
  232. };
  233. //--------------------------------------------------------------------------
  234. // Path point types (only the lowest 8 bits are used.)
  235. // The lowest 3 bits are interpreted as point type
  236. // The higher 5 bits are reserved for flags.
  237. //--------------------------------------------------------------------------
  238. enum PathPointType
  239. {
  240. PathPointTypeStart = 0, // move
  241. PathPointTypeLine = 1, // line
  242. PathPointTypeBezier = 3, // default Beizer (= cubic Bezier)
  243. PathPointTypePathTypeMask = 0x07, // type mask (lowest 3 bits).
  244. PathPointTypeDashMode = 0x10, // currently in dash mode.
  245. PathPointTypePathMarker = 0x20, // a marker for the path.
  246. PathPointTypeCloseSubpath = 0x80, // closed flag
  247. // Path types used for advanced path.
  248. PathPointTypeBezier2 = 2, // quadratic Beizer
  249. PathPointTypeBezier3 = 3, // cubic Bezier
  250. PathPointTypeBezier4 = 4, // quartic (4th order) Beizer
  251. PathPointTypeBezier5 = 5, // quintic (5th order) Bezier
  252. PathPointTypeBezier6 = 6 // hexaic (6th order) Bezier
  253. };
  254. //--------------------------------------------------------------------------
  255. // WarpMode constants
  256. //--------------------------------------------------------------------------
  257. enum WarpMode
  258. {
  259. WarpModePerspective, // 0
  260. WarpModeBilinear // 1
  261. };
  262. //--------------------------------------------------------------------------
  263. // LineGradient Mode
  264. //--------------------------------------------------------------------------
  265. enum LinearGradientMode
  266. {
  267. LinearGradientModeHorizontal, // 0
  268. LinearGradientModeVertical, // 1
  269. LinearGradientModeForwardDiagonal, // 2
  270. LinearGradientModeBackwardDiagonal // 3
  271. };
  272. //--------------------------------------------------------------------------
  273. // Region Comine Modes
  274. //--------------------------------------------------------------------------
  275. enum CombineMode
  276. {
  277. CombineModeReplace, // 0
  278. CombineModeIntersect, // 1
  279. CombineModeUnion, // 2
  280. CombineModeXor, // 3
  281. CombineModeExclude, // 4
  282. CombineModeComplement // 5 (does exclude from)
  283. };
  284. //--------------------------------------------------------------------------
  285. // Image types
  286. //--------------------------------------------------------------------------
  287. enum ImageType
  288. {
  289. ImageTypeUnknown, // 0
  290. ImageTypeBitmap, // 1
  291. ImageTypeMetafile // 2
  292. };
  293. //--------------------------------------------------------------------------
  294. // Interpolation modes
  295. //--------------------------------------------------------------------------
  296. enum InterpolationMode
  297. {
  298. InterpolationModeInvalid = QualityModeInvalid,
  299. InterpolationModeDefault = QualityModeDefault,
  300. InterpolationModeLowQuality = QualityModeLow,
  301. InterpolationModeHighQuality = QualityModeHigh,
  302. InterpolationModeBilinear,
  303. InterpolationModeBicubic,
  304. InterpolationModeNearestNeighbor,
  305. InterpolationModeHighQualityBilinear,
  306. InterpolationModeHighQualityBicubic
  307. };
  308. //--------------------------------------------------------------------------
  309. // Pen types
  310. //--------------------------------------------------------------------------
  311. enum PenAlignment
  312. {
  313. PenAlignmentCenter = 0,
  314. PenAlignmentInset = 1,
  315. PenAlignmentOutset = 2,
  316. PenAlignmentLeft = 3,
  317. PenAlignmentRight = 4
  318. };
  319. //--------------------------------------------------------------------------
  320. // Brush types
  321. //--------------------------------------------------------------------------
  322. enum BrushType
  323. {
  324. BrushTypeSolidColor = 0,
  325. BrushTypeHatchFill = 1,
  326. BrushTypeTextureFill = 2,
  327. BrushTypePathGradient = 3,
  328. BrushTypeLinearGradient = 4
  329. };
  330. //--------------------------------------------------------------------------
  331. // Pen's Fill types
  332. //--------------------------------------------------------------------------
  333. enum PenType
  334. {
  335. PenTypeSolidColor = BrushTypeSolidColor,
  336. PenTypeHatchFill = BrushTypeHatchFill,
  337. PenTypeTextureFill = BrushTypeTextureFill,
  338. PenTypePathGradient = BrushTypePathGradient,
  339. PenTypeLinearGradient = BrushTypeLinearGradient,
  340. PenTypeUnknown = -1
  341. };
  342. //--------------------------------------------------------------------------
  343. // Matrix Order
  344. //--------------------------------------------------------------------------
  345. enum MatrixOrder
  346. {
  347. MatrixOrderPrepend = 0,
  348. MatrixOrderAppend = 1
  349. };
  350. //--------------------------------------------------------------------------
  351. // Generic font families
  352. //--------------------------------------------------------------------------
  353. enum GenericFontFamily
  354. {
  355. GenericFontFamilySerif,
  356. GenericFontFamilySansSerif,
  357. GenericFontFamilyMonospace
  358. };
  359. //--------------------------------------------------------------------------
  360. // FontStyle: face types and common styles
  361. //--------------------------------------------------------------------------
  362. // These should probably be flags
  363. // Must have:
  364. // Regular = 0
  365. // Bold = 1
  366. // Italic = 2
  367. // BoldItalic = 3
  368. enum FontStyle
  369. {
  370. FontStyleRegular = 0,
  371. FontStyleBold = 1,
  372. FontStyleItalic = 2,
  373. FontStyleBoldItalic = 3,
  374. FontStyleUnderline = 4,
  375. FontStyleStrikeout = 8
  376. };
  377. //---------------------------------------------------------------------------
  378. // Smoothing Mode
  379. //---------------------------------------------------------------------------
  380. enum SmoothingMode
  381. {
  382. SmoothingModeInvalid = QualityModeInvalid,
  383. SmoothingModeDefault = QualityModeDefault,
  384. SmoothingModeHighSpeed = QualityModeLow,
  385. SmoothingModeHighQuality = QualityModeHigh,
  386. SmoothingModeNone,
  387. SmoothingModeAntiAlias
  388. };
  389. //---------------------------------------------------------------------------
  390. // Pixel Format Mode
  391. //---------------------------------------------------------------------------
  392. enum PixelOffsetMode
  393. {
  394. PixelOffsetModeInvalid = QualityModeInvalid,
  395. PixelOffsetModeDefault = QualityModeDefault,
  396. PixelOffsetModeHighSpeed = QualityModeLow,
  397. PixelOffsetModeHighQuality = QualityModeHigh,
  398. PixelOffsetModeNone, // no pixel offset
  399. PixelOffsetModeHalf // offset by -0.5, -0.5 for fast anti-alias perf
  400. };
  401. //---------------------------------------------------------------------------
  402. // Text Rendering Hint
  403. //---------------------------------------------------------------------------
  404. enum TextRenderingHint
  405. {
  406. #ifdef DCR_USE_NEW_186764
  407. TextRenderingHintSystemDefault = 0, // Glyph with system default rendering hint
  408. TextRenderingHintSingleBitPerPixelGridFit, // Glyph bitmap with hinting
  409. #else
  410. TextRenderingHintSingleBitPerPixelGridFit = 0, // Glyph bitmap with hinting
  411. #endif // DCR_USE_NEW_186764
  412. TextRenderingHintSingleBitPerPixel, // Glyph bitmap without hinting
  413. TextRenderingHintAntiAliasGridFit, // Glyph anti-alias bitmap with hinting
  414. TextRenderingHintAntiAlias, // Glyph anti-alias bitmap without hinting
  415. TextRenderingHintClearTypeGridFit // Glyph CT bitmap with hinting
  416. };
  417. //---------------------------------------------------------------------------
  418. // Metafile Types
  419. //---------------------------------------------------------------------------
  420. enum MetafileType
  421. {
  422. MetafileTypeInvalid, // Invalid metafile
  423. MetafileTypeWmf, // Standard WMF
  424. MetafileTypeWmfAldus, // Aldus Placeable Metafile format
  425. MetafileTypeEmf, // EMF (not EMF+)
  426. MetafileTypeEmfPlusOnly, // EMF+ without dual, down-level records
  427. MetafileTypeEmfPlusDual // EMF+ with dual, down-level records
  428. };
  429. // Specifies the type of EMF to record
  430. enum EmfType
  431. {
  432. EmfTypeEmfOnly = MetafileTypeEmf, // no EMF+, only EMF
  433. EmfTypeEmfPlusOnly = MetafileTypeEmfPlusOnly, // no EMF, only EMF+
  434. EmfTypeEmfPlusDual = MetafileTypeEmfPlusDual // both EMF+ and EMF
  435. };
  436. // All persistent objects must have a type listed here
  437. enum ObjectType
  438. {
  439. ObjectTypeInvalid,
  440. ObjectTypeBrush,
  441. ObjectTypePen,
  442. ObjectTypePath,
  443. ObjectTypeRegion,
  444. ObjectTypeImage,
  445. ObjectTypeFont,
  446. ObjectTypeStringFormat,
  447. ObjectTypeImageAttributes,
  448. ObjectTypeCustomLineCap,
  449. ObjectTypeMax = ObjectTypeCustomLineCap,
  450. ObjectTypeMin = ObjectTypeBrush
  451. };
  452. inline BOOL
  453. ObjectTypeIsValid(
  454. enum ObjectType type
  455. )
  456. {
  457. return ((type >= ObjectTypeMin) && (type <= ObjectTypeMax));
  458. }
  459. //---------------------------------------------------------------------------
  460. // EMF+ Records
  461. //---------------------------------------------------------------------------
  462. // We have to change the WMF record numbers so that they don't conflict with
  463. // the EMF and EMF+ record numbers.
  464. /*enum EmfPlusRecordType;*/
  465. #define GDIP_EMFPLUS_RECORD_BASE 0x00004000
  466. #define GDIP_WMF_RECORD_BASE 0x00010000
  467. #define GDIP_WMF_RECORD_TO_EMFPLUS(n) (/*(EmfPlusRecordType)*/((n) | GDIP_WMF_RECORD_BASE))
  468. #define GDIP_EMFPLUS_RECORD_TO_WMF(n) ((n) & (~GDIP_WMF_RECORD_BASE))
  469. #define GDIP_IS_WMF_RECORDTYPE(n) (((n) & GDIP_WMF_RECORD_BASE) != 0)
  470. enum EmfPlusRecordType
  471. {
  472. // Since we have to enumerate GDI records right along with GDI+ records,
  473. // we list all the GDI records here so that they can be part of the
  474. // same enumeration type which is used in the enumeration callback.
  475. WmfRecordTypeSetBkColor = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKCOLOR),
  476. WmfRecordTypeSetBkMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKMODE),
  477. WmfRecordTypeSetMapMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPMODE),
  478. WmfRecordTypeSetROP2 = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETROP2),
  479. WmfRecordTypeSetRelAbs = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETRELABS),
  480. WmfRecordTypeSetPolyFillMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPOLYFILLMODE),
  481. WmfRecordTypeSetStretchBltMode = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETSTRETCHBLTMODE),
  482. WmfRecordTypeSetTextCharExtra = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCHAREXTRA),
  483. WmfRecordTypeSetTextColor = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCOLOR),
  484. WmfRecordTypeSetTextJustification = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTJUSTIFICATION),
  485. WmfRecordTypeSetWindowOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWORG),
  486. WmfRecordTypeSetWindowExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWEXT),
  487. WmfRecordTypeSetViewportOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTORG),
  488. WmfRecordTypeSetViewportExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTEXT),
  489. WmfRecordTypeOffsetWindowOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETWINDOWORG),
  490. WmfRecordTypeScaleWindowExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEWINDOWEXT),
  491. WmfRecordTypeOffsetViewportOrg = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETVIEWPORTORG),
  492. WmfRecordTypeScaleViewportExt = GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEVIEWPORTEXT),
  493. WmfRecordTypeLineTo = GDIP_WMF_RECORD_TO_EMFPLUS(META_LINETO),
  494. WmfRecordTypeMoveTo = GDIP_WMF_RECORD_TO_EMFPLUS(META_MOVETO),
  495. WmfRecordTypeExcludeClipRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXCLUDECLIPRECT),
  496. WmfRecordTypeIntersectClipRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_INTERSECTCLIPRECT),
  497. WmfRecordTypeArc = GDIP_WMF_RECORD_TO_EMFPLUS(META_ARC),
  498. WmfRecordTypeEllipse = GDIP_WMF_RECORD_TO_EMFPLUS(META_ELLIPSE),
  499. WmfRecordTypeFloodFill = GDIP_WMF_RECORD_TO_EMFPLUS(META_FLOODFILL),
  500. WmfRecordTypePie = GDIP_WMF_RECORD_TO_EMFPLUS(META_PIE),
  501. WmfRecordTypeRectangle = GDIP_WMF_RECORD_TO_EMFPLUS(META_RECTANGLE),
  502. WmfRecordTypeRoundRect = GDIP_WMF_RECORD_TO_EMFPLUS(META_ROUNDRECT),
  503. WmfRecordTypePatBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_PATBLT),
  504. WmfRecordTypeSaveDC = GDIP_WMF_RECORD_TO_EMFPLUS(META_SAVEDC),
  505. WmfRecordTypeSetPixel = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPIXEL),
  506. WmfRecordTypeOffsetClipRgn = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETCLIPRGN),
  507. WmfRecordTypeTextOut = GDIP_WMF_RECORD_TO_EMFPLUS(META_TEXTOUT),
  508. WmfRecordTypeBitBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_BITBLT),
  509. WmfRecordTypeStretchBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHBLT),
  510. WmfRecordTypePolygon = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYGON),
  511. WmfRecordTypePolyline = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYLINE),
  512. WmfRecordTypeEscape = GDIP_WMF_RECORD_TO_EMFPLUS(META_ESCAPE),
  513. WmfRecordTypeRestoreDC = GDIP_WMF_RECORD_TO_EMFPLUS(META_RESTOREDC),
  514. WmfRecordTypeFillRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_FILLREGION),
  515. WmfRecordTypeFrameRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_FRAMEREGION),
  516. WmfRecordTypeInvertRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_INVERTREGION),
  517. WmfRecordTypePaintRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_PAINTREGION),
  518. WmfRecordTypeSelectClipRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTCLIPREGION),
  519. WmfRecordTypeSelectObject = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTOBJECT),
  520. WmfRecordTypeSetTextAlign = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTALIGN),
  521. WmfRecordTypeDrawText = GDIP_WMF_RECORD_TO_EMFPLUS(0x062F), // META_DRAWTEXT
  522. WmfRecordTypeChord = GDIP_WMF_RECORD_TO_EMFPLUS(META_CHORD),
  523. WmfRecordTypeSetMapperFlags = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPPERFLAGS),
  524. WmfRecordTypeExtTextOut = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTTEXTOUT),
  525. WmfRecordTypeSetDIBToDev = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETDIBTODEV),
  526. WmfRecordTypeSelectPalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTPALETTE),
  527. WmfRecordTypeRealizePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_REALIZEPALETTE),
  528. WmfRecordTypeAnimatePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_ANIMATEPALETTE),
  529. WmfRecordTypeSetPalEntries = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPALENTRIES),
  530. WmfRecordTypePolyPolygon = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYPOLYGON),
  531. WmfRecordTypeResizePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_RESIZEPALETTE),
  532. WmfRecordTypeDIBBitBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBBITBLT),
  533. WmfRecordTypeDIBStretchBlt = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBSTRETCHBLT),
  534. WmfRecordTypeDIBCreatePatternBrush = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBCREATEPATTERNBRUSH),
  535. WmfRecordTypeStretchDIB = GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHDIB),
  536. WmfRecordTypeExtFloodFill = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTFLOODFILL),
  537. WmfRecordTypeSetLayout = GDIP_WMF_RECORD_TO_EMFPLUS(0x0149), // META_SETLAYOUT
  538. WmfRecordTypeResetDC = GDIP_WMF_RECORD_TO_EMFPLUS(0x014C), // META_RESETDC
  539. WmfRecordTypeStartDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x014D), // META_STARTDOC
  540. WmfRecordTypeStartPage = GDIP_WMF_RECORD_TO_EMFPLUS(0x004F), // META_STARTPAGE
  541. WmfRecordTypeEndPage = GDIP_WMF_RECORD_TO_EMFPLUS(0x0050), // META_ENDPAGE
  542. WmfRecordTypeAbortDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x0052), // META_ABORTDOC
  543. WmfRecordTypeEndDoc = GDIP_WMF_RECORD_TO_EMFPLUS(0x005E), // META_ENDDOC
  544. WmfRecordTypeDeleteObject = GDIP_WMF_RECORD_TO_EMFPLUS(META_DELETEOBJECT),
  545. WmfRecordTypeCreatePalette = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPALETTE),
  546. WmfRecordTypeCreateBrush = GDIP_WMF_RECORD_TO_EMFPLUS(0x00F8), // META_CREATEBRUSH
  547. WmfRecordTypeCreatePatternBrush = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPATTERNBRUSH),
  548. WmfRecordTypeCreatePenIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPENINDIRECT),
  549. WmfRecordTypeCreateFontIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEFONTINDIRECT),
  550. WmfRecordTypeCreateBrushIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEBRUSHINDIRECT),
  551. WmfRecordTypeCreateBitmapIndirect = GDIP_WMF_RECORD_TO_EMFPLUS(0x02FD), // META_CREATEBITMAPINDIRECT
  552. WmfRecordTypeCreateBitmap = GDIP_WMF_RECORD_TO_EMFPLUS(0x06FE), // META_CREATEBITMAP
  553. WmfRecordTypeCreateRegion = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEREGION),
  554. EmfRecordTypeHeader = EMR_HEADER,
  555. EmfRecordTypePolyBezier = EMR_POLYBEZIER,
  556. EmfRecordTypePolygon = EMR_POLYGON,
  557. EmfRecordTypePolyline = EMR_POLYLINE,
  558. EmfRecordTypePolyBezierTo = EMR_POLYBEZIERTO,
  559. EmfRecordTypePolyLineTo = EMR_POLYLINETO,
  560. EmfRecordTypePolyPolyline = EMR_POLYPOLYLINE,
  561. EmfRecordTypePolyPolygon = EMR_POLYPOLYGON,
  562. EmfRecordTypeSetWindowExtEx = EMR_SETWINDOWEXTEX,
  563. EmfRecordTypeSetWindowOrgEx = EMR_SETWINDOWORGEX,
  564. EmfRecordTypeSetViewportExtEx = EMR_SETVIEWPORTEXTEX,
  565. EmfRecordTypeSetViewportOrgEx = EMR_SETVIEWPORTORGEX,
  566. EmfRecordTypeSetBrushOrgEx = EMR_SETBRUSHORGEX,
  567. EmfRecordTypeEOF = EMR_EOF,
  568. EmfRecordTypeSetPixelV = EMR_SETPIXELV,
  569. EmfRecordTypeSetMapperFlags = EMR_SETMAPPERFLAGS,
  570. EmfRecordTypeSetMapMode = EMR_SETMAPMODE,
  571. EmfRecordTypeSetBkMode = EMR_SETBKMODE,
  572. EmfRecordTypeSetPolyFillMode = EMR_SETPOLYFILLMODE,
  573. EmfRecordTypeSetROP2 = EMR_SETROP2,
  574. EmfRecordTypeSetStretchBltMode = EMR_SETSTRETCHBLTMODE,
  575. EmfRecordTypeSetTextAlign = EMR_SETTEXTALIGN,
  576. EmfRecordTypeSetColorAdjustment = EMR_SETCOLORADJUSTMENT,
  577. EmfRecordTypeSetTextColor = EMR_SETTEXTCOLOR,
  578. EmfRecordTypeSetBkColor = EMR_SETBKCOLOR,
  579. EmfRecordTypeOffsetClipRgn = EMR_OFFSETCLIPRGN,
  580. EmfRecordTypeMoveToEx = EMR_MOVETOEX,
  581. EmfRecordTypeSetMetaRgn = EMR_SETMETARGN,
  582. EmfRecordTypeExcludeClipRect = EMR_EXCLUDECLIPRECT,
  583. EmfRecordTypeIntersectClipRect = EMR_INTERSECTCLIPRECT,
  584. EmfRecordTypeScaleViewportExtEx = EMR_SCALEVIEWPORTEXTEX,
  585. EmfRecordTypeScaleWindowExtEx = EMR_SCALEWINDOWEXTEX,
  586. EmfRecordTypeSaveDC = EMR_SAVEDC,
  587. EmfRecordTypeRestoreDC = EMR_RESTOREDC,
  588. EmfRecordTypeSetWorldTransform = EMR_SETWORLDTRANSFORM,
  589. EmfRecordTypeModifyWorldTransform = EMR_MODIFYWORLDTRANSFORM,
  590. EmfRecordTypeSelectObject = EMR_SELECTOBJECT,
  591. EmfRecordTypeCreatePen = EMR_CREATEPEN,
  592. EmfRecordTypeCreateBrushIndirect = EMR_CREATEBRUSHINDIRECT,
  593. EmfRecordTypeDeleteObject = EMR_DELETEOBJECT,
  594. EmfRecordTypeAngleArc = EMR_ANGLEARC,
  595. EmfRecordTypeEllipse = EMR_ELLIPSE,
  596. EmfRecordTypeRectangle = EMR_RECTANGLE,
  597. EmfRecordTypeRoundRect = EMR_ROUNDRECT,
  598. EmfRecordTypeArc = EMR_ARC,
  599. EmfRecordTypeChord = EMR_CHORD,
  600. EmfRecordTypePie = EMR_PIE,
  601. EmfRecordTypeSelectPalette = EMR_SELECTPALETTE,
  602. EmfRecordTypeCreatePalette = EMR_CREATEPALETTE,
  603. EmfRecordTypeSetPaletteEntries = EMR_SETPALETTEENTRIES,
  604. EmfRecordTypeResizePalette = EMR_RESIZEPALETTE,
  605. EmfRecordTypeRealizePalette = EMR_REALIZEPALETTE,
  606. EmfRecordTypeExtFloodFill = EMR_EXTFLOODFILL,
  607. EmfRecordTypeLineTo = EMR_LINETO,
  608. EmfRecordTypeArcTo = EMR_ARCTO,
  609. EmfRecordTypePolyDraw = EMR_POLYDRAW,
  610. EmfRecordTypeSetArcDirection = EMR_SETARCDIRECTION,
  611. EmfRecordTypeSetMiterLimit = EMR_SETMITERLIMIT,
  612. EmfRecordTypeBeginPath = EMR_BEGINPATH,
  613. EmfRecordTypeEndPath = EMR_ENDPATH,
  614. EmfRecordTypeCloseFigure = EMR_CLOSEFIGURE,
  615. EmfRecordTypeFillPath = EMR_FILLPATH,
  616. EmfRecordTypeStrokeAndFillPath = EMR_STROKEANDFILLPATH,
  617. EmfRecordTypeStrokePath = EMR_STROKEPATH,
  618. EmfRecordTypeFlattenPath = EMR_FLATTENPATH,
  619. EmfRecordTypeWidenPath = EMR_WIDENPATH,
  620. EmfRecordTypeSelectClipPath = EMR_SELECTCLIPPATH,
  621. EmfRecordTypeAbortPath = EMR_ABORTPATH,
  622. EmfRecordTypeReserved_069 = 69, // Not Used
  623. EmfRecordTypeGdiComment = EMR_GDICOMMENT,
  624. EmfRecordTypeFillRgn = EMR_FILLRGN,
  625. EmfRecordTypeFrameRgn = EMR_FRAMERGN,
  626. EmfRecordTypeInvertRgn = EMR_INVERTRGN,
  627. EmfRecordTypePaintRgn = EMR_PAINTRGN,
  628. EmfRecordTypeExtSelectClipRgn = EMR_EXTSELECTCLIPRGN,
  629. EmfRecordTypeBitBlt = EMR_BITBLT,
  630. EmfRecordTypeStretchBlt = EMR_STRETCHBLT,
  631. EmfRecordTypeMaskBlt = EMR_MASKBLT,
  632. EmfRecordTypePlgBlt = EMR_PLGBLT,
  633. EmfRecordTypeSetDIBitsToDevice = EMR_SETDIBITSTODEVICE,
  634. EmfRecordTypeStretchDIBits = EMR_STRETCHDIBITS,
  635. EmfRecordTypeExtCreateFontIndirect = EMR_EXTCREATEFONTINDIRECTW,
  636. EmfRecordTypeExtTextOutA = EMR_EXTTEXTOUTA,
  637. EmfRecordTypeExtTextOutW = EMR_EXTTEXTOUTW,
  638. EmfRecordTypePolyBezier16 = EMR_POLYBEZIER16,
  639. EmfRecordTypePolygon16 = EMR_POLYGON16,
  640. EmfRecordTypePolyline16 = EMR_POLYLINE16,
  641. EmfRecordTypePolyBezierTo16 = EMR_POLYBEZIERTO16,
  642. EmfRecordTypePolylineTo16 = EMR_POLYLINETO16,
  643. EmfRecordTypePolyPolyline16 = EMR_POLYPOLYLINE16,
  644. EmfRecordTypePolyPolygon16 = EMR_POLYPOLYGON16,
  645. EmfRecordTypePolyDraw16 = EMR_POLYDRAW16,
  646. EmfRecordTypeCreateMonoBrush = EMR_CREATEMONOBRUSH,
  647. EmfRecordTypeCreateDIBPatternBrushPt = EMR_CREATEDIBPATTERNBRUSHPT,
  648. EmfRecordTypeExtCreatePen = EMR_EXTCREATEPEN,
  649. EmfRecordTypePolyTextOutA = EMR_POLYTEXTOUTA,
  650. EmfRecordTypePolyTextOutW = EMR_POLYTEXTOUTW,
  651. EmfRecordTypeSetICMMode = 98, // EMR_SETICMMODE,
  652. EmfRecordTypeCreateColorSpace = 99, // EMR_CREATECOLORSPACE,
  653. EmfRecordTypeSetColorSpace = 100, // EMR_SETCOLORSPACE,
  654. EmfRecordTypeDeleteColorSpace = 101, // EMR_DELETECOLORSPACE,
  655. EmfRecordTypeGLSRecord = 102, // EMR_GLSRECORD,
  656. EmfRecordTypeGLSBoundedRecord = 103, // EMR_GLSBOUNDEDRECORD,
  657. EmfRecordTypePixelFormat = 104, // EMR_PIXELFORMAT,
  658. EmfRecordTypeDrawEscape = 105, // EMR_RESERVED_105,
  659. EmfRecordTypeExtEscape = 106, // EMR_RESERVED_106,
  660. EmfRecordTypeStartDoc = 107, // EMR_RESERVED_107,
  661. EmfRecordTypeSmallTextOut = 108, // EMR_RESERVED_108,
  662. EmfRecordTypeForceUFIMapping = 109, // EMR_RESERVED_109,
  663. EmfRecordTypeNamedEscape = 110, // EMR_RESERVED_110,
  664. EmfRecordTypeColorCorrectPalette = 111, // EMR_COLORCORRECTPALETTE,
  665. EmfRecordTypeSetICMProfileA = 112, // EMR_SETICMPROFILEA,
  666. EmfRecordTypeSetICMProfileW = 113, // EMR_SETICMPROFILEW,
  667. EmfRecordTypeAlphaBlend = 114, // EMR_ALPHABLEND,
  668. EmfRecordTypeSetLayout = 115, // EMR_SETLAYOUT,
  669. EmfRecordTypeTransparentBlt = 116, // EMR_TRANSPARENTBLT,
  670. EmfRecordTypeReserved_117 = 117, // Not Used
  671. EmfRecordTypeGradientFill = 118, // EMR_GRADIENTFILL,
  672. EmfRecordTypeSetLinkedUFIs = 119, // EMR_RESERVED_119,
  673. EmfRecordTypeSetTextJustification = 120, // EMR_RESERVED_120,
  674. EmfRecordTypeColorMatchToTargetW = 121, // EMR_COLORMATCHTOTARGETW,
  675. EmfRecordTypeCreateColorSpaceW = 122, // EMR_CREATECOLORSPACEW,
  676. EmfRecordTypeMax = 122,
  677. EmfRecordTypeMin = 1,
  678. // That is the END of the GDI EMF records.
  679. // Now we start the list of EMF+ records. We leave quite
  680. // a bit of room here for the addition of any new GDI
  681. // records that may be added later.
  682. EmfPlusRecordTypeInvalid = GDIP_EMFPLUS_RECORD_BASE,
  683. EmfPlusRecordTypeHeader,
  684. EmfPlusRecordTypeEndOfFile,
  685. EmfPlusRecordTypeComment,
  686. EmfPlusRecordTypeGetDC, // the application grabbed the metafile dc
  687. EmfPlusRecordTypeMultiFormatStart,
  688. EmfPlusRecordTypeMultiFormatSection,
  689. EmfPlusRecordTypeMultiFormatEnd,
  690. // For all persistent objects
  691. EmfPlusRecordTypeObject, // brush,pen,path,region,image,font,string-format
  692. // Drawing Records
  693. EmfPlusRecordTypeClear,
  694. EmfPlusRecordTypeFillRects,
  695. EmfPlusRecordTypeDrawRects,
  696. EmfPlusRecordTypeFillPolygon,
  697. EmfPlusRecordTypeDrawLines,
  698. EmfPlusRecordTypeFillEllipse,
  699. EmfPlusRecordTypeDrawEllipse,
  700. EmfPlusRecordTypeFillPie,
  701. EmfPlusRecordTypeDrawPie,
  702. EmfPlusRecordTypeDrawArc,
  703. EmfPlusRecordTypeFillRegion,
  704. EmfPlusRecordTypeFillPath,
  705. EmfPlusRecordTypeDrawPath,
  706. EmfPlusRecordTypeFillClosedCurve,
  707. EmfPlusRecordTypeDrawClosedCurve,
  708. EmfPlusRecordTypeDrawCurve,
  709. EmfPlusRecordTypeDrawBeziers,
  710. EmfPlusRecordTypeDrawImage,
  711. EmfPlusRecordTypeDrawImagePoints,
  712. EmfPlusRecordTypeDrawString,
  713. // Graphics State Records
  714. EmfPlusRecordTypeSetRenderingOrigin,
  715. EmfPlusRecordTypeSetAntiAliasMode,
  716. EmfPlusRecordTypeSetTextRenderingHint,
  717. #ifdef DCR_USE_NEW_188922
  718. EmfPlusRecordTypeSetTextContrast,
  719. #else
  720. EmfPlusRecordTypeSetGammaValue,
  721. #endif // DCR_USE_NEW_188922
  722. EmfPlusRecordTypeSetInterpolationMode,
  723. EmfPlusRecordTypeSetPixelOffsetMode,
  724. EmfPlusRecordTypeSetCompositingMode,
  725. EmfPlusRecordTypeSetCompositingQuality,
  726. EmfPlusRecordTypeSave,
  727. EmfPlusRecordTypeRestore,
  728. EmfPlusRecordTypeBeginContainer,
  729. EmfPlusRecordTypeBeginContainerNoParams,
  730. EmfPlusRecordTypeEndContainer,
  731. EmfPlusRecordTypeSetWorldTransform,
  732. EmfPlusRecordTypeResetWorldTransform,
  733. EmfPlusRecordTypeMultiplyWorldTransform,
  734. EmfPlusRecordTypeTranslateWorldTransform,
  735. EmfPlusRecordTypeScaleWorldTransform,
  736. EmfPlusRecordTypeRotateWorldTransform,
  737. EmfPlusRecordTypeSetPageTransform,
  738. EmfPlusRecordTypeResetClip,
  739. EmfPlusRecordTypeSetClipRect,
  740. EmfPlusRecordTypeSetClipPath,
  741. EmfPlusRecordTypeSetClipRegion,
  742. EmfPlusRecordTypeOffsetClip,
  743. // New record types must be added here (at the end) -- do not add above,
  744. // since that will invalidate previous metafiles!
  745. EmfPlusRecordTypeDrawDriverString,
  746. // Have this here so you don't need to keep changing the value of
  747. // EmfPlusRecordTypeMax every time you add a new record.
  748. EmfPlusRecordTotal,
  749. EmfPlusRecordTypeMax = EmfPlusRecordTotal-1,
  750. EmfPlusRecordTypeMin = EmfPlusRecordTypeHeader,
  751. };
  752. //---------------------------------------------------------------------------
  753. // StringFormatFlags
  754. //---------------------------------------------------------------------------
  755. //---------------------------------------------------------------------------
  756. // String format flags
  757. //
  758. // DirectionRightToLeft - For horizontal text, the reading order is
  759. // right to left. This value is called
  760. // the base embedding level by the Unicode
  761. // bidirectional engine.
  762. // For vertical text, columns are read from
  763. // right to left.
  764. // By default, horizontal or vertical text is
  765. // read from left to right.
  766. //
  767. // DirectionVertical - Individual lines of text are vertical. In
  768. // each line, characters progress from top to
  769. // bottom.
  770. // By default, lines of text are horizontal,
  771. // each new line below the previous line.
  772. //
  773. // NoFitBlackBox - Allows parts of glyphs to overhang the
  774. // bounding rectangle.
  775. // By default glyphs are first aligned
  776. // inside the margines, then any glyphs which
  777. // still overhang the bounding box are
  778. // repositioned to avoid any overhang.
  779. // For example when an italic
  780. // lower case letter f in a font such as
  781. // Garamond is aligned at the far left of a
  782. // rectangle, the lower part of the f will
  783. // reach slightly further left than the left
  784. // edge of the rectangle. Setting this flag
  785. // will ensure the character aligns visually
  786. // with the lines above and below, but may
  787. // cause some pixels outside the formatting
  788. // rectangle to be clipped or painted.
  789. //
  790. #ifndef DCR_USE_NEW_137252
  791. // NumberContextArabic - Causes any initial numeric in the string to
  792. // be analysed for bidirection layout as if
  793. // it was preceeded by Arabic text.
  794. //
  795. // DisableKashidaJustification - Arabic text will not be justified by the
  796. // insertion of kashidas (i.e. extending the
  797. // joining line between characters). Instead
  798. // Arabic script will be justified by the
  799. // widening of the whitespace between words.
  800. //
  801. #endif
  802. // DisplayFormatControl - Causes control characters such as the
  803. // left-to-right mark to be shown in the
  804. // output with a representative glyph.
  805. //
  806. #ifndef DCR_USE_NEW_137252
  807. // DisableKerning - Disables Truetype and OpenType kerning.
  808. //
  809. // DisableLigatures - Disables Truetype and OpenType ligatures.
  810. //
  811. // LayoutLegacyBidi - Causes the bidirection algorithm to use
  812. // slightly different classifications for
  813. // '+', '-' and '/' that make their layout
  814. // much closer to that expected by files
  815. // generated in Windows or by Windows
  816. // applications.
  817. //
  818. // NoChanges - A text imager created with this flag set
  819. // does not support those APIs that change
  820. // it's contents or formatting, but for most
  821. // simple text will be significantly faster in
  822. // performing measurement and drawing
  823. // functions.
  824. //
  825. #endif
  826. // NoFontFallback - Disables fallback to alternate fonts for
  827. // characters not supported in the requested
  828. // font. Any missing characters will be
  829. // be displayed with the fonts missing glyph,
  830. // usually an open square.
  831. //
  832. // NoWrap - Disables wrapping of text between lines
  833. // when formatting within a rectangle.
  834. // NoWrap is implied when a point is passed
  835. // instead of a rectangle, or when the
  836. // specified rectangle has a zero line length.
  837. //
  838. // NoClip - By default text is clipped to the
  839. // formatting rectangle. Setting NoClip
  840. // allows overhanging pixels to affect the
  841. // device outside the formatting rectangle.
  842. // Pixels at the end of the line may be
  843. // affected if the glyphs overhang their
  844. // cells, and either the NoFitBlackBox flag
  845. // has been set, or the glyph extends to far
  846. // to be fitted.
  847. // Pixels above/before the first line or
  848. // below/after the last line may be affected
  849. // if the glyphs extend beyond their cell
  850. // ascent / descent. This can occur rarely
  851. // with unusual diacritic mark combinations.
  852. //---------------------------------------------------------------------------
  853. enum StringFormatFlags
  854. {
  855. StringFormatFlagsDirectionRightToLeft = 0x00000001,
  856. StringFormatFlagsDirectionVertical = 0x00000002,
  857. StringFormatFlagsNoFitBlackBox = 0x00000004,
  858. #ifndef DCR_USE_NEW_137252
  859. StringFormatFlagsNumberContextArabic = 0x00000008,
  860. StringFormatFlagsDisableKashidaJustification = 0x00000010,
  861. #endif
  862. StringFormatFlagsDisplayFormatControl = 0x00000020,
  863. #ifndef DCR_USE_NEW_137252
  864. StringFormatFlagsDisableKerning = 0x00000040,
  865. StringFormatFlagsDisableLigatures = 0x00000080,
  866. StringFormatFlagsLayoutLegacyBidi = 0x00000100,
  867. StringFormatFlagsNoChanges = 0x00000200,
  868. #endif
  869. StringFormatFlagsNoFontFallback = 0x00000400,
  870. StringFormatFlagsMeasureTrailingSpaces = 0x00000800,
  871. StringFormatFlagsNoWrap = 0x00001000,
  872. StringFormatFlagsLineLimit = 0x00002000,
  873. StringFormatFlagsNoClip = 0x00004000
  874. };
  875. //---------------------------------------------------------------------------
  876. // StringTrimming
  877. //---------------------------------------------------------------------------
  878. enum StringTrimming {
  879. StringTrimmingNone = 0,
  880. StringTrimmingCharacter = 1,
  881. StringTrimmingWord = 2,
  882. StringTrimmingEllipsisCharacter = 3,
  883. StringTrimmingEllipsisWord = 4,
  884. StringTrimmingEllipsisPath = 5
  885. };
  886. #ifndef DCR_USE_NEW_137252
  887. //---------------------------------------------------------------------------
  888. // String units
  889. //
  890. // String units are like length units in CSS, they may be absolute, or
  891. // they may be relative to a font size.
  892. //
  893. //---------------------------------------------------------------------------
  894. enum StringUnit {
  895. StringUnitWorld = UnitWorld,
  896. StringUnitDisplay = UnitDisplay,
  897. StringUnitPixel = UnitPixel,
  898. StringUnitPoint = UnitPoint,
  899. StringUnitInch = UnitInch,
  900. StringUnitDocument = UnitDocument,
  901. StringUnitMillimeter = UnitMillimeter,
  902. StringUnitEm = 32
  903. };
  904. #endif
  905. #ifndef DCR_USE_NEW_152154
  906. //---------------------------------------------------------------------------
  907. // Line spacing flags
  908. //---------------------------------------------------------------------------
  909. enum LineSpacing {
  910. LineSpacingWorld = UnitWorld,
  911. LineSpacingDisplay = UnitDisplay,
  912. LineSpacingPixel = UnitPixel,
  913. LineSpacingPoint = UnitPoint,
  914. LineSpacingInch = UnitInch,
  915. LineSpacingDocument = UnitDocument,
  916. LineSpacingMillimeter = UnitMillimeter,
  917. LineSpacingRecommended = 32,
  918. LineSpacingAtLeast = 33,
  919. LineSpacingAtLeastMultiple = 34,
  920. LineSpacingCell = 35,
  921. LineSpacingCellAtLeast = 36,
  922. LineSpacingCellAtLeastMultiple = 37
  923. };
  924. /// The following methods of linespacing are relative to the font size
  925. //
  926. // =========== Method =========== =============== Relative to ===============
  927. //
  928. // LineSpacingRecommended recommended line spacing specified by font
  929. // LineSpacingAtLeast max(recommended, tallest glyph cell)
  930. // LineSpacingAtLeastMultiple smallest multiple of recommended big enough
  931. // for all glyph cells on the line
  932. // LineSpacingCell cell height
  933. // LineSpacingCellAtLeast max(font cell height, tallest glyph cell)
  934. // LineSpacingCellAtLeastMultiple smallest multiple of cell height big enough
  935. // for all glyph cells on the line
  936. #endif
  937. //---------------------------------------------------------------------------
  938. // National language digit substitution
  939. //---------------------------------------------------------------------------
  940. enum StringDigitSubstitute
  941. {
  942. StringDigitSubstituteUser = 0, // As NLS setting
  943. StringDigitSubstituteNone = 1,
  944. StringDigitSubstituteNational = 2,
  945. StringDigitSubstituteTraditional = 3
  946. };
  947. //---------------------------------------------------------------------------
  948. // Hotkey prefix interpretation
  949. //---------------------------------------------------------------------------
  950. enum HotkeyPrefix
  951. {
  952. HotkeyPrefixNone = 0,
  953. HotkeyPrefixShow = 1,
  954. HotkeyPrefixHide = 2
  955. };
  956. //---------------------------------------------------------------------------
  957. // Text alignment flags
  958. //---------------------------------------------------------------------------
  959. enum StringAlignment
  960. {
  961. // Left edge for left-to-right text,
  962. // right for right-to-left text,
  963. // and top for vertical
  964. StringAlignmentNear = 0,
  965. StringAlignmentCenter = 1,
  966. StringAlignmentFar = 2
  967. };
  968. //---------------------------------------------------------------------------
  969. // DriverStringOptions
  970. //---------------------------------------------------------------------------
  971. enum DriverStringOptions
  972. {
  973. DriverStringOptionsCmapLookup = 1,
  974. DriverStringOptionsVertical = 2,
  975. DriverStringOptionsRealizedAdvance = 4,
  976. #ifndef DCR_USE_NEW_137252
  977. DriverStringOptionsCompensateResolution = 8
  978. #endif
  979. };
  980. //---------------------------------------------------------------------------
  981. // Flush Intention flags
  982. //---------------------------------------------------------------------------
  983. enum FlushIntention
  984. {
  985. FlushIntentionFlush = 0, // Flush all batched rendering operations
  986. FlushIntentionSync = 1 // Flush all batched rendering operations
  987. // and wait for them to complete
  988. };
  989. #ifndef DCR_USE_NEW_175866
  990. //---------------------------------------------------------------------------
  991. // Window Change Notification types
  992. //---------------------------------------------------------------------------
  993. enum WindowNotifyEnum
  994. {
  995. WindowNotifyEnumEnable = 0,
  996. WindowNotifyEnumDisable,
  997. WindowNotifyEnumPalette,
  998. WindowNotifyEnumDisplay,
  999. WindowNotifyEnumSysColor
  1000. };
  1001. #endif
  1002. //---------------------------------------------------------------------------
  1003. // Image encoder parameter related types
  1004. //---------------------------------------------------------------------------
  1005. #ifdef DCR_USE_NEW_145804
  1006. enum EncoderParameterValueType
  1007. {
  1008. EncoderParameterValueTypeByte = 1, // 8-bit unsigned int
  1009. EncoderParameterValueTypeASCII = 2, // 8-bit byte containing one 7-bit ASCII
  1010. // code. NULL terminated.
  1011. EncoderParameterValueTypeShort = 3, // 16-bit unsigned int
  1012. EncoderParameterValueTypeLong = 4, // 32-bit unsigned int
  1013. EncoderParameterValueTypeRational = 5, // Two Longs. The first Long is the
  1014. // numerator, the second Long expresses the
  1015. // denomintor.
  1016. EncoderParameterValueTypeLongRange = 6, // Two longs which specify a range of
  1017. // integer values. The first Long specifies
  1018. // the lower end and the second one
  1019. // specifies the higher end. All values
  1020. // are inclusive at both ends
  1021. EncoderParameterValueTypeUndefined = 7, // 8-bit byte that can take any value
  1022. // depending on field definition
  1023. EncoderParameterValueTypeRationalRange = 8 // Two Rationals. The first Rational
  1024. // specifies the lower end and the second
  1025. // specifies the higher end. All values
  1026. // are inclusive at both ends
  1027. };
  1028. #else
  1029. enum ValueType
  1030. {
  1031. ValueTypeByte = 1, // 8-bit unsigned int
  1032. ValueTypeASCII = 2, // 8-bit byte containing one 7-bit ASCII
  1033. // code. NULL terminated.
  1034. ValueTypeShort = 3, // 16-bit unsigned int
  1035. ValueTypeLong = 4, // 32-bit unsigned int
  1036. ValueTypeRational = 5, // Two Longs. The first Long is the
  1037. // numerator, the second Long expresses the
  1038. // denomintor.
  1039. ValueTypeLongRange = 6, // Two longs which specify a range of
  1040. // integer values. The first Long specifies
  1041. // the lower end and the second one
  1042. // specifies the higher end. All values
  1043. // are inclusive at both ends
  1044. ValueTypeUndefined = 7, // 8-bit byte that can take any value
  1045. // depending on field definition
  1046. ValueTypeRationalRange = 8 // Two Rationals. The first Rational
  1047. // specifies the lower end and the second
  1048. // specifies the higher end. All values
  1049. // are inclusive at both ends
  1050. };
  1051. #endif
  1052. //---------------------------------------------------------------------------
  1053. // Image encoder value types
  1054. //---------------------------------------------------------------------------
  1055. enum EncoderValue
  1056. {
  1057. EncoderValueColorTypeCMYK,
  1058. EncoderValueColorTypeYCCK,
  1059. EncoderValueCompressionLZW,
  1060. EncoderValueCompressionCCITT3,
  1061. EncoderValueCompressionCCITT4,
  1062. EncoderValueCompressionRle,
  1063. EncoderValueCompressionNone,
  1064. EncoderValueScanMethodInterlaced,
  1065. EncoderValueScanMethodNonInterlaced,
  1066. EncoderValueVersionGif87,
  1067. EncoderValueVersionGif89,
  1068. EncoderValueRenderProgressive,
  1069. EncoderValueRenderNonProgressive,
  1070. EncoderValueTransformRotate90,
  1071. EncoderValueTransformRotate180,
  1072. EncoderValueTransformRotate270,
  1073. EncoderValueTransformFlipHorizontal,
  1074. EncoderValueTransformFlipVertical,
  1075. #ifdef DCR_USE_NEW_140861
  1076. EncoderValueMultiFrame,
  1077. #else
  1078. EncodeValueMultiFrame,
  1079. #endif
  1080. EncoderValueLastFrame,
  1081. EncoderValueFlush,
  1082. #ifdef DCR_USE_NEW_140861
  1083. EncoderValueFrameDimensionTime,
  1084. EncoderValueFrameDimensionResolution,
  1085. EncoderValueFrameDimensionPage
  1086. #else
  1087. EncodeValueFrameDimensionTime,
  1088. EncodeValueFrameDimensionResolution,
  1089. EncodeValueFrameDimensionPage
  1090. #endif
  1091. };
  1092. //---------------------------------------------------------------------------
  1093. // Graphics layout values (support for Middle East localization)
  1094. //---------------------------------------------------------------------------
  1095. enum GraphicsLayout
  1096. {
  1097. GraphicsLayoutNormal,
  1098. GraphicsLayoutMirrored,
  1099. GraphicsLayoutMirroredIgnoreImages,
  1100. GraphicsLayoutMirroredForceImages
  1101. };
  1102. //---------------------------------------------------------------------------
  1103. // Image layout values (support for Middle East localization)
  1104. //---------------------------------------------------------------------------
  1105. enum ImageLayout
  1106. {
  1107. ImageLayoutNormal,
  1108. ImageLayoutIgnoreMirrored
  1109. };
  1110. enum EmfToWmfBitsFlags
  1111. {
  1112. EmfToWmfBitsFlagsDefault = 0x00000000,
  1113. EmfToWmfBitsFlagsEmbedEmf = 0x00000001,
  1114. EmfToWmfBitsFlagsIncludeAPM = 0x00000002,
  1115. EmfToWmfBitsFlagsNoXORClip = 0x00000004
  1116. };
  1117. #endif // !_GDIPLUSENUMS_H