GdiPlusEnums.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:47k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /**************************************************************************
  2. *
  3. * Copyright (c) 1998-2001, Microsoft Corp.  All Rights Reserved.
  4. *
  5. * Module Name:
  6. *
  7. *   GdiplusEnums.h
  8. *
  9. * Abstract:
  10. *
  11. *   GDI+ 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, // Best performance
  41.     QualityModeHigh      = 2  // 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,   
  173.     HatchStyleLargeGrid = HatchStyleCross,  // 4
  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 Bezier (= 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.     PathPointTypeBezier3    = 3,         // cubic Bezier
  249. };
  250. //--------------------------------------------------------------------------
  251. // WarpMode constants
  252. //--------------------------------------------------------------------------
  253. enum WarpMode
  254. {
  255.     WarpModePerspective,    // 0
  256.     WarpModeBilinear        // 1
  257. };
  258. //--------------------------------------------------------------------------
  259. // LineGradient Mode
  260. //--------------------------------------------------------------------------
  261. enum LinearGradientMode
  262. {
  263.     LinearGradientModeHorizontal,         // 0
  264.     LinearGradientModeVertical,           // 1
  265.     LinearGradientModeForwardDiagonal,    // 2
  266.     LinearGradientModeBackwardDiagonal    // 3
  267. };
  268. //--------------------------------------------------------------------------
  269. // Region Comine Modes
  270. //--------------------------------------------------------------------------
  271. enum CombineMode
  272. {
  273.     CombineModeReplace,     // 0
  274.     CombineModeIntersect,   // 1
  275.     CombineModeUnion,       // 2
  276.     CombineModeXor,         // 3
  277.     CombineModeExclude,     // 4
  278.     CombineModeComplement   // 5 (Exclude From)
  279. };
  280. //--------------------------------------------------------------------------
  281.  // Image types
  282. //--------------------------------------------------------------------------
  283. enum ImageType
  284. {
  285.     ImageTypeUnknown,   // 0
  286.     ImageTypeBitmap,    // 1
  287.     ImageTypeMetafile   // 2
  288. };
  289. //--------------------------------------------------------------------------
  290. // Interpolation modes
  291. //--------------------------------------------------------------------------
  292. enum InterpolationMode
  293. {
  294.     InterpolationModeInvalid          = QualityModeInvalid,
  295.     InterpolationModeDefault          = QualityModeDefault,
  296.     InterpolationModeLowQuality       = QualityModeLow,
  297.     InterpolationModeHighQuality      = QualityModeHigh,
  298.     InterpolationModeBilinear,
  299.     InterpolationModeBicubic,
  300.     InterpolationModeNearestNeighbor,
  301.     InterpolationModeHighQualityBilinear,
  302.     InterpolationModeHighQualityBicubic
  303. };
  304. //--------------------------------------------------------------------------
  305. // Pen types
  306. //--------------------------------------------------------------------------
  307. enum PenAlignment
  308. {
  309.     PenAlignmentCenter       = 0,
  310.     PenAlignmentInset        = 1
  311. };
  312. //--------------------------------------------------------------------------
  313. // Brush types
  314. //--------------------------------------------------------------------------
  315. enum BrushType
  316. {
  317.    BrushTypeSolidColor       = 0,
  318.    BrushTypeHatchFill        = 1,
  319.    BrushTypeTextureFill      = 2,
  320.    BrushTypePathGradient     = 3,
  321.    BrushTypeLinearGradient   = 4
  322. };
  323. //--------------------------------------------------------------------------
  324. // Pen's Fill types
  325. //--------------------------------------------------------------------------
  326. enum PenType
  327. {
  328.    PenTypeSolidColor       = BrushTypeSolidColor,
  329.    PenTypeHatchFill        = BrushTypeHatchFill,
  330.    PenTypeTextureFill      = BrushTypeTextureFill,
  331.    PenTypePathGradient     = BrushTypePathGradient,
  332.    PenTypeLinearGradient   = BrushTypeLinearGradient,
  333.    PenTypeUnknown          = -1
  334. };
  335. //--------------------------------------------------------------------------
  336. // Matrix Order
  337. //--------------------------------------------------------------------------
  338. enum MatrixOrder
  339. {
  340.     MatrixOrderPrepend    = 0,
  341.     MatrixOrderAppend     = 1
  342. };
  343. //--------------------------------------------------------------------------
  344. // Generic font families
  345. //--------------------------------------------------------------------------
  346. enum GenericFontFamily
  347. {
  348.     GenericFontFamilySerif,
  349.     GenericFontFamilySansSerif,
  350.     GenericFontFamilyMonospace
  351. };
  352. //--------------------------------------------------------------------------
  353. // FontStyle: face types and common styles
  354. //--------------------------------------------------------------------------
  355. enum FontStyle
  356. {
  357.     FontStyleRegular    = 0,
  358.     FontStyleBold       = 1,
  359.     FontStyleItalic     = 2,
  360.     FontStyleBoldItalic = 3,
  361.     FontStyleUnderline  = 4,
  362.     FontStyleStrikeout  = 8
  363. };
  364. //---------------------------------------------------------------------------
  365. // Smoothing Mode
  366. //---------------------------------------------------------------------------
  367. enum SmoothingMode
  368. {
  369.     SmoothingModeInvalid     = QualityModeInvalid,
  370.     SmoothingModeDefault     = QualityModeDefault,
  371.     SmoothingModeHighSpeed   = QualityModeLow,
  372.     SmoothingModeHighQuality = QualityModeHigh,
  373.     SmoothingModeNone,
  374.     SmoothingModeAntiAlias
  375. };
  376. //---------------------------------------------------------------------------
  377. // Pixel Format Mode
  378. //---------------------------------------------------------------------------
  379. enum PixelOffsetMode
  380. {
  381.     PixelOffsetModeInvalid     = QualityModeInvalid,
  382.     PixelOffsetModeDefault     = QualityModeDefault,
  383.     PixelOffsetModeHighSpeed   = QualityModeLow,
  384.     PixelOffsetModeHighQuality = QualityModeHigh,
  385.     PixelOffsetModeNone,    // No pixel offset
  386.     PixelOffsetModeHalf     // Offset by -0.5, -0.5 for fast anti-alias perf
  387. };
  388. //---------------------------------------------------------------------------
  389. // Text Rendering Hint
  390. //---------------------------------------------------------------------------
  391. enum TextRenderingHint
  392. {
  393.     TextRenderingHintSystemDefault = 0,            // Glyph with system default rendering hint
  394.     TextRenderingHintSingleBitPerPixelGridFit,     // Glyph bitmap with hinting
  395.     TextRenderingHintSingleBitPerPixel,            // Glyph bitmap without hinting
  396.     TextRenderingHintAntiAliasGridFit,             // Glyph anti-alias bitmap with hinting
  397.     TextRenderingHintAntiAlias,                    // Glyph anti-alias bitmap without hinting
  398.     TextRenderingHintClearTypeGridFit              // Glyph CT bitmap with hinting
  399. };
  400. //---------------------------------------------------------------------------
  401. // Metafile Types
  402. //---------------------------------------------------------------------------
  403. enum MetafileType
  404. {
  405.     MetafileTypeInvalid,            // Invalid metafile
  406.     MetafileTypeWmf,                // Standard WMF
  407.     MetafileTypeWmfPlaceable,       // Placeable WMF
  408.     MetafileTypeEmf,                // EMF (not EMF+)
  409.     MetafileTypeEmfPlusOnly,        // EMF+ without dual, down-level records
  410.     MetafileTypeEmfPlusDual         // EMF+ with dual, down-level records
  411. };
  412. //---------------------------------------------------------------------------
  413. // Specifies the type of EMF to record
  414. //---------------------------------------------------------------------------
  415. enum EmfType
  416. {
  417.     EmfTypeEmfOnly     = MetafileTypeEmf,          // no EMF+, only EMF
  418.     EmfTypeEmfPlusOnly = MetafileTypeEmfPlusOnly,  // no EMF, only EMF+
  419.     EmfTypeEmfPlusDual = MetafileTypeEmfPlusDual   // both EMF+ and EMF
  420. };
  421. //---------------------------------------------------------------------------
  422. // EMF+ Persistent object types
  423. //---------------------------------------------------------------------------
  424. enum ObjectType
  425. {
  426.     ObjectTypeInvalid,
  427.     ObjectTypeBrush,
  428.     ObjectTypePen,
  429.     ObjectTypePath,
  430.     ObjectTypeRegion,
  431.     ObjectTypeImage,
  432.     ObjectTypeFont,
  433.     ObjectTypeStringFormat,
  434.     ObjectTypeImageAttributes,
  435.     ObjectTypeCustomLineCap,
  436.     ObjectTypeMax = ObjectTypeCustomLineCap,
  437.     ObjectTypeMin = ObjectTypeBrush
  438. };
  439. inline BOOL
  440. ObjectTypeIsValid(
  441.     ObjectType      type
  442.     )
  443. {
  444.     return ((type >= ObjectTypeMin) && (type <= ObjectTypeMax));
  445. }
  446. //---------------------------------------------------------------------------
  447. // EMF+ Records
  448. //---------------------------------------------------------------------------
  449. // We have to change the WMF record numbers so that they don't conflict with
  450. // the EMF and EMF+ record numbers.
  451. enum EmfPlusRecordType;
  452. #define GDIP_EMFPLUS_RECORD_BASE        0x00004000
  453. #define GDIP_WMF_RECORD_BASE            0x00010000
  454. #define GDIP_WMF_RECORD_TO_EMFPLUS(n)   ((EmfPlusRecordType)((n) | GDIP_WMF_RECORD_BASE))
  455. #define GDIP_EMFPLUS_RECORD_TO_WMF(n)   ((n) & (~GDIP_WMF_RECORD_BASE))
  456. #define GDIP_IS_WMF_RECORDTYPE(n)       (((n) & GDIP_WMF_RECORD_BASE) != 0)
  457. enum EmfPlusRecordType
  458. {
  459.    // Since we have to enumerate GDI records right along with GDI+ records,
  460.    // We list all the GDI records here so that they can be part of the
  461.    // same enumeration type which is used in the enumeration callback.
  462.     WmfRecordTypeSetBkColor              = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKCOLOR),
  463.     WmfRecordTypeSetBkMode               = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKMODE),
  464.     WmfRecordTypeSetMapMode              = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPMODE),
  465.     WmfRecordTypeSetROP2                 = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETROP2),
  466.     WmfRecordTypeSetRelAbs               = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETRELABS),
  467.     WmfRecordTypeSetPolyFillMode         = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPOLYFILLMODE),
  468.     WmfRecordTypeSetStretchBltMode       = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETSTRETCHBLTMODE),
  469.     WmfRecordTypeSetTextCharExtra        = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCHAREXTRA),
  470.     WmfRecordTypeSetTextColor            = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCOLOR),
  471.     WmfRecordTypeSetTextJustification    = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTJUSTIFICATION),
  472.     WmfRecordTypeSetWindowOrg            = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWORG),
  473.     WmfRecordTypeSetWindowExt            = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWEXT),
  474.     WmfRecordTypeSetViewportOrg          = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTORG),
  475.     WmfRecordTypeSetViewportExt          = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTEXT),
  476.     WmfRecordTypeOffsetWindowOrg         = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETWINDOWORG),
  477.     WmfRecordTypeScaleWindowExt          = GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEWINDOWEXT),
  478.     WmfRecordTypeOffsetViewportOrg       = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETVIEWPORTORG),
  479.     WmfRecordTypeScaleViewportExt        = GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEVIEWPORTEXT),
  480.     WmfRecordTypeLineTo                  = GDIP_WMF_RECORD_TO_EMFPLUS(META_LINETO),
  481.     WmfRecordTypeMoveTo                  = GDIP_WMF_RECORD_TO_EMFPLUS(META_MOVETO),
  482.     WmfRecordTypeExcludeClipRect         = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXCLUDECLIPRECT),
  483.     WmfRecordTypeIntersectClipRect       = GDIP_WMF_RECORD_TO_EMFPLUS(META_INTERSECTCLIPRECT),
  484.     WmfRecordTypeArc                     = GDIP_WMF_RECORD_TO_EMFPLUS(META_ARC),
  485.     WmfRecordTypeEllipse                 = GDIP_WMF_RECORD_TO_EMFPLUS(META_ELLIPSE),
  486.     WmfRecordTypeFloodFill               = GDIP_WMF_RECORD_TO_EMFPLUS(META_FLOODFILL),
  487.     WmfRecordTypePie                     = GDIP_WMF_RECORD_TO_EMFPLUS(META_PIE),
  488.     WmfRecordTypeRectangle               = GDIP_WMF_RECORD_TO_EMFPLUS(META_RECTANGLE),
  489.     WmfRecordTypeRoundRect               = GDIP_WMF_RECORD_TO_EMFPLUS(META_ROUNDRECT),
  490.     WmfRecordTypePatBlt                  = GDIP_WMF_RECORD_TO_EMFPLUS(META_PATBLT),
  491.     WmfRecordTypeSaveDC                  = GDIP_WMF_RECORD_TO_EMFPLUS(META_SAVEDC),
  492.     WmfRecordTypeSetPixel                = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPIXEL),
  493.     WmfRecordTypeOffsetClipRgn           = GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETCLIPRGN),
  494.     WmfRecordTypeTextOut                 = GDIP_WMF_RECORD_TO_EMFPLUS(META_TEXTOUT),
  495.     WmfRecordTypeBitBlt                  = GDIP_WMF_RECORD_TO_EMFPLUS(META_BITBLT),
  496.     WmfRecordTypeStretchBlt              = GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHBLT),
  497.     WmfRecordTypePolygon                 = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYGON),
  498.     WmfRecordTypePolyline                = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYLINE),
  499.     WmfRecordTypeEscape                  = GDIP_WMF_RECORD_TO_EMFPLUS(META_ESCAPE),
  500.     WmfRecordTypeRestoreDC               = GDIP_WMF_RECORD_TO_EMFPLUS(META_RESTOREDC),
  501.     WmfRecordTypeFillRegion              = GDIP_WMF_RECORD_TO_EMFPLUS(META_FILLREGION),
  502.     WmfRecordTypeFrameRegion             = GDIP_WMF_RECORD_TO_EMFPLUS(META_FRAMEREGION),
  503.     WmfRecordTypeInvertRegion            = GDIP_WMF_RECORD_TO_EMFPLUS(META_INVERTREGION),
  504.     WmfRecordTypePaintRegion             = GDIP_WMF_RECORD_TO_EMFPLUS(META_PAINTREGION),
  505.     WmfRecordTypeSelectClipRegion        = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTCLIPREGION),
  506.     WmfRecordTypeSelectObject            = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTOBJECT),
  507.     WmfRecordTypeSetTextAlign            = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTALIGN),
  508.     WmfRecordTypeDrawText                = GDIP_WMF_RECORD_TO_EMFPLUS(0x062F),  // META_DRAWTEXT
  509.     WmfRecordTypeChord                   = GDIP_WMF_RECORD_TO_EMFPLUS(META_CHORD),
  510.     WmfRecordTypeSetMapperFlags          = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPPERFLAGS),
  511.     WmfRecordTypeExtTextOut              = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTTEXTOUT),
  512.     WmfRecordTypeSetDIBToDev             = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETDIBTODEV),
  513.     WmfRecordTypeSelectPalette           = GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTPALETTE),
  514.     WmfRecordTypeRealizePalette          = GDIP_WMF_RECORD_TO_EMFPLUS(META_REALIZEPALETTE),
  515.     WmfRecordTypeAnimatePalette          = GDIP_WMF_RECORD_TO_EMFPLUS(META_ANIMATEPALETTE),
  516.     WmfRecordTypeSetPalEntries           = GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPALENTRIES),
  517.     WmfRecordTypePolyPolygon             = GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYPOLYGON),
  518.     WmfRecordTypeResizePalette           = GDIP_WMF_RECORD_TO_EMFPLUS(META_RESIZEPALETTE),
  519.     WmfRecordTypeDIBBitBlt               = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBBITBLT),
  520.     WmfRecordTypeDIBStretchBlt           = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBSTRETCHBLT),
  521.     WmfRecordTypeDIBCreatePatternBrush   = GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBCREATEPATTERNBRUSH),
  522.     WmfRecordTypeStretchDIB              = GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHDIB),
  523.     WmfRecordTypeExtFloodFill            = GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTFLOODFILL),
  524.     WmfRecordTypeSetLayout               = GDIP_WMF_RECORD_TO_EMFPLUS(0x0149),  // META_SETLAYOUT
  525.     WmfRecordTypeResetDC                 = GDIP_WMF_RECORD_TO_EMFPLUS(0x014C),  // META_RESETDC
  526.     WmfRecordTypeStartDoc                = GDIP_WMF_RECORD_TO_EMFPLUS(0x014D),  // META_STARTDOC
  527.     WmfRecordTypeStartPage               = GDIP_WMF_RECORD_TO_EMFPLUS(0x004F),  // META_STARTPAGE
  528.     WmfRecordTypeEndPage                 = GDIP_WMF_RECORD_TO_EMFPLUS(0x0050),  // META_ENDPAGE
  529.     WmfRecordTypeAbortDoc                = GDIP_WMF_RECORD_TO_EMFPLUS(0x0052),  // META_ABORTDOC
  530.     WmfRecordTypeEndDoc                  = GDIP_WMF_RECORD_TO_EMFPLUS(0x005E),  // META_ENDDOC
  531.     WmfRecordTypeDeleteObject            = GDIP_WMF_RECORD_TO_EMFPLUS(META_DELETEOBJECT),
  532.     WmfRecordTypeCreatePalette           = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPALETTE),
  533.     WmfRecordTypeCreateBrush             = GDIP_WMF_RECORD_TO_EMFPLUS(0x00F8),  // META_CREATEBRUSH
  534.     WmfRecordTypeCreatePatternBrush      = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPATTERNBRUSH),
  535.     WmfRecordTypeCreatePenIndirect       = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPENINDIRECT),
  536.     WmfRecordTypeCreateFontIndirect      = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEFONTINDIRECT),
  537.     WmfRecordTypeCreateBrushIndirect     = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEBRUSHINDIRECT),
  538.     WmfRecordTypeCreateBitmapIndirect    = GDIP_WMF_RECORD_TO_EMFPLUS(0x02FD),  // META_CREATEBITMAPINDIRECT
  539.     WmfRecordTypeCreateBitmap            = GDIP_WMF_RECORD_TO_EMFPLUS(0x06FE),  // META_CREATEBITMAP
  540.     WmfRecordTypeCreateRegion            = GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEREGION),
  541.     EmfRecordTypeHeader                  = EMR_HEADER,
  542.     EmfRecordTypePolyBezier              = EMR_POLYBEZIER,
  543.     EmfRecordTypePolygon                 = EMR_POLYGON,
  544.     EmfRecordTypePolyline                = EMR_POLYLINE,
  545.     EmfRecordTypePolyBezierTo            = EMR_POLYBEZIERTO,
  546.     EmfRecordTypePolyLineTo              = EMR_POLYLINETO,
  547.     EmfRecordTypePolyPolyline            = EMR_POLYPOLYLINE,
  548.     EmfRecordTypePolyPolygon             = EMR_POLYPOLYGON,
  549.     EmfRecordTypeSetWindowExtEx          = EMR_SETWINDOWEXTEX,
  550.     EmfRecordTypeSetWindowOrgEx          = EMR_SETWINDOWORGEX,
  551.     EmfRecordTypeSetViewportExtEx        = EMR_SETVIEWPORTEXTEX,
  552.     EmfRecordTypeSetViewportOrgEx        = EMR_SETVIEWPORTORGEX,
  553.     EmfRecordTypeSetBrushOrgEx           = EMR_SETBRUSHORGEX,
  554.     EmfRecordTypeEOF                     = EMR_EOF,
  555.     EmfRecordTypeSetPixelV               = EMR_SETPIXELV,
  556.     EmfRecordTypeSetMapperFlags          = EMR_SETMAPPERFLAGS,
  557.     EmfRecordTypeSetMapMode              = EMR_SETMAPMODE,
  558.     EmfRecordTypeSetBkMode               = EMR_SETBKMODE,
  559.     EmfRecordTypeSetPolyFillMode         = EMR_SETPOLYFILLMODE,
  560.     EmfRecordTypeSetROP2                 = EMR_SETROP2,
  561.     EmfRecordTypeSetStretchBltMode       = EMR_SETSTRETCHBLTMODE,
  562.     EmfRecordTypeSetTextAlign            = EMR_SETTEXTALIGN,
  563.     EmfRecordTypeSetColorAdjustment      = EMR_SETCOLORADJUSTMENT,
  564.     EmfRecordTypeSetTextColor            = EMR_SETTEXTCOLOR,
  565.     EmfRecordTypeSetBkColor              = EMR_SETBKCOLOR,
  566.     EmfRecordTypeOffsetClipRgn           = EMR_OFFSETCLIPRGN,
  567.     EmfRecordTypeMoveToEx                = EMR_MOVETOEX,
  568.     EmfRecordTypeSetMetaRgn              = EMR_SETMETARGN,
  569.     EmfRecordTypeExcludeClipRect         = EMR_EXCLUDECLIPRECT,
  570.     EmfRecordTypeIntersectClipRect       = EMR_INTERSECTCLIPRECT,
  571.     EmfRecordTypeScaleViewportExtEx      = EMR_SCALEVIEWPORTEXTEX,
  572.     EmfRecordTypeScaleWindowExtEx        = EMR_SCALEWINDOWEXTEX,
  573.     EmfRecordTypeSaveDC                  = EMR_SAVEDC,
  574.     EmfRecordTypeRestoreDC               = EMR_RESTOREDC,
  575.     EmfRecordTypeSetWorldTransform       = EMR_SETWORLDTRANSFORM,
  576.     EmfRecordTypeModifyWorldTransform    = EMR_MODIFYWORLDTRANSFORM,
  577.     EmfRecordTypeSelectObject            = EMR_SELECTOBJECT,
  578.     EmfRecordTypeCreatePen               = EMR_CREATEPEN,
  579.     EmfRecordTypeCreateBrushIndirect     = EMR_CREATEBRUSHINDIRECT,
  580.     EmfRecordTypeDeleteObject            = EMR_DELETEOBJECT,
  581.     EmfRecordTypeAngleArc                = EMR_ANGLEARC,
  582.     EmfRecordTypeEllipse                 = EMR_ELLIPSE,
  583.     EmfRecordTypeRectangle               = EMR_RECTANGLE,
  584.     EmfRecordTypeRoundRect               = EMR_ROUNDRECT,
  585.     EmfRecordTypeArc                     = EMR_ARC,
  586.     EmfRecordTypeChord                   = EMR_CHORD,
  587.     EmfRecordTypePie                     = EMR_PIE,
  588.     EmfRecordTypeSelectPalette           = EMR_SELECTPALETTE,
  589.     EmfRecordTypeCreatePalette           = EMR_CREATEPALETTE,
  590.     EmfRecordTypeSetPaletteEntries       = EMR_SETPALETTEENTRIES,
  591.     EmfRecordTypeResizePalette           = EMR_RESIZEPALETTE,
  592.     EmfRecordTypeRealizePalette          = EMR_REALIZEPALETTE,
  593.     EmfRecordTypeExtFloodFill            = EMR_EXTFLOODFILL,
  594.     EmfRecordTypeLineTo                  = EMR_LINETO,
  595.     EmfRecordTypeArcTo                   = EMR_ARCTO,
  596.     EmfRecordTypePolyDraw                = EMR_POLYDRAW,
  597.     EmfRecordTypeSetArcDirection         = EMR_SETARCDIRECTION,
  598.     EmfRecordTypeSetMiterLimit           = EMR_SETMITERLIMIT,
  599.     EmfRecordTypeBeginPath               = EMR_BEGINPATH,
  600.     EmfRecordTypeEndPath                 = EMR_ENDPATH,
  601.     EmfRecordTypeCloseFigure             = EMR_CLOSEFIGURE,
  602.     EmfRecordTypeFillPath                = EMR_FILLPATH,
  603.     EmfRecordTypeStrokeAndFillPath       = EMR_STROKEANDFILLPATH,
  604.     EmfRecordTypeStrokePath              = EMR_STROKEPATH,
  605.     EmfRecordTypeFlattenPath             = EMR_FLATTENPATH,
  606.     EmfRecordTypeWidenPath               = EMR_WIDENPATH,
  607.     EmfRecordTypeSelectClipPath          = EMR_SELECTCLIPPATH,
  608.     EmfRecordTypeAbortPath               = EMR_ABORTPATH,
  609.     EmfRecordTypeReserved_069            = 69,  // Not Used
  610.     EmfRecordTypeGdiComment              = EMR_GDICOMMENT,
  611.     EmfRecordTypeFillRgn                 = EMR_FILLRGN,
  612.     EmfRecordTypeFrameRgn                = EMR_FRAMERGN,
  613.     EmfRecordTypeInvertRgn               = EMR_INVERTRGN,
  614.     EmfRecordTypePaintRgn                = EMR_PAINTRGN,
  615.     EmfRecordTypeExtSelectClipRgn        = EMR_EXTSELECTCLIPRGN,
  616.     EmfRecordTypeBitBlt                  = EMR_BITBLT,
  617.     EmfRecordTypeStretchBlt              = EMR_STRETCHBLT,
  618.     EmfRecordTypeMaskBlt                 = EMR_MASKBLT,
  619.     EmfRecordTypePlgBlt                  = EMR_PLGBLT,
  620.     EmfRecordTypeSetDIBitsToDevice       = EMR_SETDIBITSTODEVICE,
  621.     EmfRecordTypeStretchDIBits           = EMR_STRETCHDIBITS,
  622.     EmfRecordTypeExtCreateFontIndirect   = EMR_EXTCREATEFONTINDIRECTW,
  623.     EmfRecordTypeExtTextOutA             = EMR_EXTTEXTOUTA,
  624.     EmfRecordTypeExtTextOutW             = EMR_EXTTEXTOUTW,
  625.     EmfRecordTypePolyBezier16            = EMR_POLYBEZIER16,
  626.     EmfRecordTypePolygon16               = EMR_POLYGON16,
  627.     EmfRecordTypePolyline16              = EMR_POLYLINE16,
  628.     EmfRecordTypePolyBezierTo16          = EMR_POLYBEZIERTO16,
  629.     EmfRecordTypePolylineTo16            = EMR_POLYLINETO16,
  630.     EmfRecordTypePolyPolyline16          = EMR_POLYPOLYLINE16,
  631.     EmfRecordTypePolyPolygon16           = EMR_POLYPOLYGON16,
  632.     EmfRecordTypePolyDraw16              = EMR_POLYDRAW16,
  633.     EmfRecordTypeCreateMonoBrush         = EMR_CREATEMONOBRUSH,
  634.     EmfRecordTypeCreateDIBPatternBrushPt = EMR_CREATEDIBPATTERNBRUSHPT,
  635.     EmfRecordTypeExtCreatePen            = EMR_EXTCREATEPEN,
  636.     EmfRecordTypePolyTextOutA            = EMR_POLYTEXTOUTA,
  637.     EmfRecordTypePolyTextOutW            = EMR_POLYTEXTOUTW,
  638.     EmfRecordTypeSetICMMode              = 98,  // EMR_SETICMMODE,
  639.     EmfRecordTypeCreateColorSpace        = 99,  // EMR_CREATECOLORSPACE,
  640.     EmfRecordTypeSetColorSpace           = 100, // EMR_SETCOLORSPACE,
  641.     EmfRecordTypeDeleteColorSpace        = 101, // EMR_DELETECOLORSPACE,
  642.     EmfRecordTypeGLSRecord               = 102, // EMR_GLSRECORD,
  643.     EmfRecordTypeGLSBoundedRecord        = 103, // EMR_GLSBOUNDEDRECORD,
  644.     EmfRecordTypePixelFormat             = 104, // EMR_PIXELFORMAT,
  645.     EmfRecordTypeDrawEscape              = 105, // EMR_RESERVED_105,
  646.     EmfRecordTypeExtEscape               = 106, // EMR_RESERVED_106,
  647.     EmfRecordTypeStartDoc                = 107, // EMR_RESERVED_107,
  648.     EmfRecordTypeSmallTextOut            = 108, // EMR_RESERVED_108,
  649.     EmfRecordTypeForceUFIMapping         = 109, // EMR_RESERVED_109,
  650.     EmfRecordTypeNamedEscape             = 110, // EMR_RESERVED_110,
  651.     EmfRecordTypeColorCorrectPalette     = 111, // EMR_COLORCORRECTPALETTE,
  652.     EmfRecordTypeSetICMProfileA          = 112, // EMR_SETICMPROFILEA,
  653.     EmfRecordTypeSetICMProfileW          = 113, // EMR_SETICMPROFILEW,
  654.     EmfRecordTypeAlphaBlend              = 114, // EMR_ALPHABLEND,
  655.     EmfRecordTypeSetLayout               = 115, // EMR_SETLAYOUT,
  656.     EmfRecordTypeTransparentBlt          = 116, // EMR_TRANSPARENTBLT,
  657.     EmfRecordTypeReserved_117            = 117, // Not Used
  658.     EmfRecordTypeGradientFill            = 118, // EMR_GRADIENTFILL,
  659.     EmfRecordTypeSetLinkedUFIs           = 119, // EMR_RESERVED_119,
  660.     EmfRecordTypeSetTextJustification    = 120, // EMR_RESERVED_120,
  661.     EmfRecordTypeColorMatchToTargetW     = 121, // EMR_COLORMATCHTOTARGETW,
  662.     EmfRecordTypeCreateColorSpaceW       = 122, // EMR_CREATECOLORSPACEW,
  663.     EmfRecordTypeMax                     = 122,
  664.     EmfRecordTypeMin                     = 1,
  665.     // That is the END of the GDI EMF records.
  666.     // Now we start the list of EMF+ records.  We leave quite
  667.     // a bit of room here for the addition of any new GDI
  668.     // records that may be added later.
  669.     EmfPlusRecordTypeInvalid = GDIP_EMFPLUS_RECORD_BASE,
  670.     EmfPlusRecordTypeHeader,
  671.     EmfPlusRecordTypeEndOfFile,
  672.     EmfPlusRecordTypeComment,
  673.     EmfPlusRecordTypeGetDC,
  674.     EmfPlusRecordTypeMultiFormatStart,
  675.     EmfPlusRecordTypeMultiFormatSection,
  676.     EmfPlusRecordTypeMultiFormatEnd,
  677.     // For all persistent objects
  678.     
  679.     EmfPlusRecordTypeObject,
  680.     // Drawing Records
  681.     
  682.     EmfPlusRecordTypeClear,
  683.     EmfPlusRecordTypeFillRects,
  684.     EmfPlusRecordTypeDrawRects,
  685.     EmfPlusRecordTypeFillPolygon,
  686.     EmfPlusRecordTypeDrawLines,
  687.     EmfPlusRecordTypeFillEllipse,
  688.     EmfPlusRecordTypeDrawEllipse,
  689.     EmfPlusRecordTypeFillPie,
  690.     EmfPlusRecordTypeDrawPie,
  691.     EmfPlusRecordTypeDrawArc,
  692.     EmfPlusRecordTypeFillRegion,
  693.     EmfPlusRecordTypeFillPath,
  694.     EmfPlusRecordTypeDrawPath,
  695.     EmfPlusRecordTypeFillClosedCurve,
  696.     EmfPlusRecordTypeDrawClosedCurve,
  697.     EmfPlusRecordTypeDrawCurve,
  698.     EmfPlusRecordTypeDrawBeziers,
  699.     EmfPlusRecordTypeDrawImage,
  700.     EmfPlusRecordTypeDrawImagePoints,
  701.     EmfPlusRecordTypeDrawString,
  702.     // Graphics State Records
  703.     
  704.     EmfPlusRecordTypeSetRenderingOrigin,
  705.     EmfPlusRecordTypeSetAntiAliasMode,
  706.     EmfPlusRecordTypeSetTextRenderingHint,
  707.     EmfPlusRecordTypeSetTextContrast,
  708.     EmfPlusRecordTypeSetInterpolationMode,
  709.     EmfPlusRecordTypeSetPixelOffsetMode,
  710.     EmfPlusRecordTypeSetCompositingMode,
  711.     EmfPlusRecordTypeSetCompositingQuality,
  712.     EmfPlusRecordTypeSave,
  713.     EmfPlusRecordTypeRestore,
  714.     EmfPlusRecordTypeBeginContainer,
  715.     EmfPlusRecordTypeBeginContainerNoParams,
  716.     EmfPlusRecordTypeEndContainer,
  717.     EmfPlusRecordTypeSetWorldTransform,
  718.     EmfPlusRecordTypeResetWorldTransform,
  719.     EmfPlusRecordTypeMultiplyWorldTransform,
  720.     EmfPlusRecordTypeTranslateWorldTransform,
  721.     EmfPlusRecordTypeScaleWorldTransform,
  722.     EmfPlusRecordTypeRotateWorldTransform,
  723.     EmfPlusRecordTypeSetPageTransform,
  724.     EmfPlusRecordTypeResetClip,
  725.     EmfPlusRecordTypeSetClipRect,
  726.     EmfPlusRecordTypeSetClipPath,
  727.     EmfPlusRecordTypeSetClipRegion,
  728.     EmfPlusRecordTypeOffsetClip,
  729.     EmfPlusRecordTypeDrawDriverString,
  730.     EmfPlusRecordTotal,
  731.     EmfPlusRecordTypeMax = EmfPlusRecordTotal-1,
  732.     EmfPlusRecordTypeMin = EmfPlusRecordTypeHeader,
  733. };
  734. //---------------------------------------------------------------------------
  735. // StringFormatFlags
  736. //---------------------------------------------------------------------------
  737. //---------------------------------------------------------------------------
  738. // String format flags
  739. //
  740. //  DirectionRightToLeft          - For horizontal text, the reading order is
  741. //                                  right to left. This value is called
  742. //                                  the base embedding level by the Unicode
  743. //                                  bidirectional engine.
  744. //                                  For vertical text, columns are read from
  745. //                                  right to left.
  746. //                                  By default, horizontal or vertical text is
  747. //                                  read from left to right.
  748. //
  749. //  DirectionVertical             - Individual lines of text are vertical. In
  750. //                                  each line, characters progress from top to
  751. //                                  bottom.
  752. //                                  By default, lines of text are horizontal,
  753. //                                  each new line below the previous line.
  754. //
  755. //  NoFitBlackBox                 - Allows parts of glyphs to overhang the
  756. //                                  bounding rectangle.
  757. //                                  By default glyphs are first aligned
  758. //                                  inside the margines, then any glyphs which
  759. //                                  still overhang the bounding box are
  760. //                                  repositioned to avoid any overhang.
  761. //                                  For example when an italic
  762. //                                  lower case letter f in a font such as
  763. //                                  Garamond is aligned at the far left of a
  764. //                                  rectangle, the lower part of the f will
  765. //                                  reach slightly further left than the left
  766. //                                  edge of the rectangle. Setting this flag
  767. //                                  will ensure the character aligns visually
  768. //                                  with the lines above and below, but may
  769. //                                  cause some pixels outside the formatting
  770. //                                  rectangle to be clipped or painted.
  771. //
  772. //  DisplayFormatControl          - Causes control characters such as the
  773. //                                  left-to-right mark to be shown in the
  774. //                                  output with a representative glyph.
  775. //
  776. //  NoFontFallback                - Disables fallback to alternate fonts for
  777. //                                  characters not supported in the requested
  778. //                                  font. Any missing characters will be
  779. //                                  be displayed with the fonts missing glyph,
  780. //                                  usually an open square.
  781. //
  782. //  NoWrap                        - Disables wrapping of text between lines
  783. //                                  when formatting within a rectangle.
  784. //                                  NoWrap is implied when a point is passed
  785. //                                  instead of a rectangle, or when the
  786. //                                  specified rectangle has a zero line length.
  787. //
  788. //  NoClip                        - By default text is clipped to the
  789. //                                  formatting rectangle. Setting NoClip
  790. //                                  allows overhanging pixels to affect the
  791. //                                  device outside the formatting rectangle.
  792. //                                  Pixels at the end of the line may be
  793. //                                  affected if the glyphs overhang their
  794. //                                  cells, and either the NoFitBlackBox flag
  795. //                                  has been set, or the glyph extends to far
  796. //                                  to be fitted.
  797. //                                  Pixels above/before the first line or
  798. //                                  below/after the last line may be affected
  799. //                                  if the glyphs extend beyond their cell
  800. //                                  ascent / descent. This can occur rarely
  801. //                                  with unusual diacritic mark combinations.
  802. //---------------------------------------------------------------------------
  803. enum StringFormatFlags
  804. {
  805.     StringFormatFlagsDirectionRightToLeft        = 0x00000001,
  806.     StringFormatFlagsDirectionVertical           = 0x00000002,
  807.     StringFormatFlagsNoFitBlackBox               = 0x00000004,
  808.     StringFormatFlagsDisplayFormatControl        = 0x00000020,
  809.     StringFormatFlagsNoFontFallback              = 0x00000400,
  810.     StringFormatFlagsMeasureTrailingSpaces       = 0x00000800,
  811.     StringFormatFlagsNoWrap                      = 0x00001000,
  812.     StringFormatFlagsLineLimit                   = 0x00002000,
  813.     StringFormatFlagsNoClip                      = 0x00004000
  814. };
  815. //---------------------------------------------------------------------------
  816. // StringTrimming
  817. //---------------------------------------------------------------------------
  818. enum StringTrimming {
  819.     StringTrimmingNone              = 0,
  820.     StringTrimmingCharacter         = 1,
  821.     StringTrimmingWord              = 2,
  822.     StringTrimmingEllipsisCharacter = 3,
  823.     StringTrimmingEllipsisWord      = 4,
  824.     StringTrimmingEllipsisPath      = 5
  825. };
  826. //---------------------------------------------------------------------------
  827. // National language digit substitution
  828. //---------------------------------------------------------------------------
  829. enum StringDigitSubstitute
  830. {
  831.     StringDigitSubstituteUser        = 0,  // As NLS setting
  832.     StringDigitSubstituteNone        = 1,
  833.     StringDigitSubstituteNational    = 2,
  834.     StringDigitSubstituteTraditional = 3
  835. };
  836. //---------------------------------------------------------------------------
  837. // Hotkey prefix interpretation
  838. //---------------------------------------------------------------------------
  839. enum HotkeyPrefix
  840. {
  841.     HotkeyPrefixNone        = 0,
  842.     HotkeyPrefixShow        = 1,
  843.     HotkeyPrefixHide        = 2
  844. };
  845. //---------------------------------------------------------------------------
  846. // String alignment flags
  847. //---------------------------------------------------------------------------
  848. enum StringAlignment
  849. {
  850.     // Left edge for left-to-right text,
  851.     // right for right-to-left text,
  852.     // and top for vertical
  853.     StringAlignmentNear   = 0,
  854.     StringAlignmentCenter = 1,
  855.     StringAlignmentFar    = 2
  856. };
  857. //---------------------------------------------------------------------------
  858. // DriverStringOptions
  859. //---------------------------------------------------------------------------
  860. enum DriverStringOptions
  861. {
  862.     DriverStringOptionsCmapLookup             = 1,
  863.     DriverStringOptionsVertical               = 2,
  864.     DriverStringOptionsRealizedAdvance        = 4,
  865.     DriverStringOptionsLimitSubpixel          = 8
  866. };
  867. //---------------------------------------------------------------------------
  868. // Flush Intention flags
  869. //---------------------------------------------------------------------------
  870. enum FlushIntention
  871. {
  872.     FlushIntentionFlush = 0,        // Flush all batched rendering operations
  873.     FlushIntentionSync = 1          // Flush all batched rendering operations
  874.                                     // and wait for them to complete
  875. };
  876. //---------------------------------------------------------------------------
  877. // Image encoder parameter related types
  878. //---------------------------------------------------------------------------
  879. enum EncoderParameterValueType
  880. {
  881.     EncoderParameterValueTypeByte           = 1,    // 8-bit unsigned int
  882.     EncoderParameterValueTypeASCII          = 2,    // 8-bit byte containing one 7-bit ASCII
  883.                                                     // code. NULL terminated.
  884.     EncoderParameterValueTypeShort          = 3,    // 16-bit unsigned int
  885.     EncoderParameterValueTypeLong           = 4,    // 32-bit unsigned int
  886.     EncoderParameterValueTypeRational       = 5,    // Two Longs. The first Long is the
  887.                                                     // numerator, the second Long expresses the
  888.                                                     // denomintor.
  889.     EncoderParameterValueTypeLongRange      = 6,    // Two longs which specify a range of
  890.                                                     // integer values. The first Long specifies
  891.                                                     // the lower end and the second one
  892.                                                     // specifies the higher end. All values
  893.                                                     // are inclusive at both ends
  894.     EncoderParameterValueTypeUndefined      = 7,    // 8-bit byte that can take any value
  895.                                                     // depending on field definition
  896.     EncoderParameterValueTypeRationalRange  = 8     // Two Rationals. The first Rational
  897.                                                     // specifies the lower end and the second
  898.                                                     // specifies the higher end. All values
  899.                                                     // are inclusive at both ends
  900. };
  901. //---------------------------------------------------------------------------
  902. // Image encoder value types
  903. //---------------------------------------------------------------------------
  904. enum EncoderValue
  905. {
  906.     EncoderValueColorTypeCMYK,
  907.     EncoderValueColorTypeYCCK,
  908.     EncoderValueCompressionLZW,
  909.     EncoderValueCompressionCCITT3,
  910.     EncoderValueCompressionCCITT4,
  911.     EncoderValueCompressionRle,
  912.     EncoderValueCompressionNone,
  913.     EncoderValueScanMethodInterlaced,
  914.     EncoderValueScanMethodNonInterlaced,
  915.     EncoderValueVersionGif87,
  916.     EncoderValueVersionGif89,
  917.     EncoderValueRenderProgressive,
  918.     EncoderValueRenderNonProgressive,
  919.     EncoderValueTransformRotate90,
  920.     EncoderValueTransformRotate180,
  921.     EncoderValueTransformRotate270,
  922.     EncoderValueTransformFlipHorizontal,
  923.     EncoderValueTransformFlipVertical,
  924.     EncoderValueMultiFrame,
  925.     EncoderValueLastFrame,
  926.     EncoderValueFlush,
  927.     EncoderValueFrameDimensionTime,
  928.     EncoderValueFrameDimensionResolution,
  929.     EncoderValueFrameDimensionPage
  930. };
  931. //---------------------------------------------------------------------------
  932. // Conversion of Emf To WMF Bits flags
  933. //---------------------------------------------------------------------------
  934. enum EmfToWmfBitsFlags
  935. {
  936.     EmfToWmfBitsFlagsDefault          = 0x00000000,
  937.     EmfToWmfBitsFlagsEmbedEmf         = 0x00000001,
  938.     EmfToWmfBitsFlagsIncludePlaceable = 0x00000002,
  939.     EmfToWmfBitsFlagsNoXORClip        = 0x00000004
  940. };
  941. #endif // !_GDIPLUSENUMS_H