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