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.

1114 lines
48 KiB

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