-
Notifications
You must be signed in to change notification settings - Fork 3
/
gdiplusenums.go
1365 lines (1205 loc) · 64.3 KB
/
gdiplusenums.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package gdiplus
import (
. "github.com/tryor/winapi"
)
//--------------------------------------------------------------------------
// Default bezier flattening tolerance in device pixels.
//--------------------------------------------------------------------------
const FlatnessDefault REAL = 1.0 / 4.0
//--------------------------------------------------------------------------
// Graphics and Container State cookies
//--------------------------------------------------------------------------
type GraphicsState UINT
type GraphicsContainer UINT
//--------------------------------------------------------------------------
// Fill mode constants
//--------------------------------------------------------------------------
type FillMode INT
const (
FillModeAlternate FillMode = 0 // 0
FillModeWinding FillMode = 1 // 1
)
//--------------------------------------------------------------------------
// Quality mode constants
//--------------------------------------------------------------------------
type QualityMode int
const (
QualityModeInvalid QualityMode = -1
QualityModeDefault QualityMode = 0
QualityModeLow QualityMode = 1 // for apps that need the best performance
QualityModeHigh QualityMode = 2 // for apps that need the best rendering quality
)
//--------------------------------------------------------------------------
// Alpha compositing mode constants
//--------------------------------------------------------------------------
type CompositingMode INT
const (
CompositingModeSourceOver CompositingMode = 0 // 0
CompositingModeSourceCopy CompositingMode = 1 // 1
)
//--------------------------------------------------------------------------
// Alpha compositing quality constants
//--------------------------------------------------------------------------
type CompositingQuality int
const (
CompositingQualityInvalid CompositingQuality = CompositingQuality(QualityModeInvalid)
CompositingQualityDefault CompositingQuality = CompositingQuality(QualityModeDefault)
CompositingQualityHighSpeed CompositingQuality = CompositingQuality(QualityModeLow)
CompositingQualityHighQuality CompositingQuality = CompositingQuality(QualityModeHigh)
CompositingQualityGammaCorrected = 3
CompositingQualityAssumeLinear = 4
)
//--------------------------------------------------------------------------
// Unit constants
//--------------------------------------------------------------------------
type Unit INT
const (
UnitWorld Unit = iota // 0 -- World coordinate (non-physical unit)
UnitDisplay // 1 -- Variable -- for PageTransform only
UnitPixel // 2 -- Each unit is one device pixel.
UnitPoint // 3 -- Each unit is a printer's point, or 1/72 inch.
UnitInch // 4 -- Each unit is 1 inch.
UnitDocument // 5 -- Each unit is 1/300 inch.
UnitMillimeter // 6 -- Each unit is 1 millimeter.
)
//--------------------------------------------------------------------------
// MetafileFrameUnit
//
// The frameRect for creating a metafile can be specified in any of these
// units. There is an extra frame unit value (MetafileFrameUnitGdi) so
// that units can be supplied in the same units that GDI expects for
// frame rects -- these units are in .01 (1/100ths) millimeter units
// as defined by GDI.
//--------------------------------------------------------------------------
type MetafileFrameUnit INT
const (
MetafileFrameUnitPixel MetafileFrameUnit = MetafileFrameUnit(UnitPixel)
MetafileFrameUnitPoint MetafileFrameUnit = MetafileFrameUnit(UnitPoint)
MetafileFrameUnitInch MetafileFrameUnit = MetafileFrameUnit(UnitInch)
MetafileFrameUnitDocument MetafileFrameUnit = MetafileFrameUnit(UnitDocument)
MetafileFrameUnitMillimeter MetafileFrameUnit = MetafileFrameUnit(UnitMillimeter)
MetafileFrameUnitGdi MetafileFrameUnit = 7 // GDI compatible .01 MM units
)
//--------------------------------------------------------------------------
// Coordinate space identifiers
//--------------------------------------------------------------------------
type CoordinateSpace INT
const (
CoordinateSpaceWorld CoordinateSpace = iota // 0
CoordinateSpacePage // 1
CoordinateSpaceDevice // 2
)
//--------------------------------------------------------------------------
// Various wrap modes for brushes
//--------------------------------------------------------------------------
type WrapMode INT
const (
WrapModeTile WrapMode = iota // 0
WrapModeTileFlipX // 1
WrapModeTileFlipY // 2
WrapModeTileFlipXY // 3
WrapModeClamp // 4
)
//--------------------------------------------------------------------------
// Various hatch styles
//--------------------------------------------------------------------------
type HatchStyle INT
const (
HatchStyleHorizontal HatchStyle = iota // 0
HatchStyleVertical // 1
HatchStyleForwardDiagonal // 2
HatchStyleBackwardDiagonal // 3
HatchStyleCross // 4
HatchStyleDiagonalCross // 5
HatchStyle05Percent // 6
HatchStyle10Percent // 7
HatchStyle20Percent // 8
HatchStyle25Percent // 9
HatchStyle30Percent // 10
HatchStyle40Percent // 11
HatchStyle50Percent // 12
HatchStyle60Percent // 13
HatchStyle70Percent // 14
HatchStyle75Percent // 15
HatchStyle80Percent // 16
HatchStyle90Percent // 17
HatchStyleLightDownwardDiagonal // 18
HatchStyleLightUpwardDiagonal // 19
HatchStyleDarkDownwardDiagonal // 20
HatchStyleDarkUpwardDiagonal // 21
HatchStyleWideDownwardDiagonal // 22
HatchStyleWideUpwardDiagonal // 23
HatchStyleLightVertical // 24
HatchStyleLightHorizontal // 25
HatchStyleNarrowVertical // 26
HatchStyleNarrowHorizontal // 27
HatchStyleDarkVertical // 28
HatchStyleDarkHorizontal // 29
HatchStyleDashedDownwardDiagonal // 30
HatchStyleDashedUpwardDiagonal // 31
HatchStyleDashedHorizontal // 32
HatchStyleDashedVertical // 33
HatchStyleSmallConfetti // 34
HatchStyleLargeConfetti // 35
HatchStyleZigZag // 36
HatchStyleWave // 37
HatchStyleDiagonalBrick // 38
HatchStyleHorizontalBrick // 39
HatchStyleWeave // 40
HatchStylePlaid // 41
HatchStyleDivot // 42
HatchStyleDottedGrid // 43
HatchStyleDottedDiamond // 44
HatchStyleShingle // 45
HatchStyleTrellis // 46
HatchStyleSphere // 47
HatchStyleSmallGrid // 48
HatchStyleSmallCheckerBoard // 49
HatchStyleLargeCheckerBoard // 50
HatchStyleOutlinedDiamond // 51
HatchStyleSolidDiamond // 52
HatchStyleTotal // must be after all unique hatch styles
HatchStyleLargeGrid = HatchStyleCross // 4 an alias for the cross style
HatchStyleMin = HatchStyleHorizontal
HatchStyleMax = HatchStyleTotal - 1
)
//--------------------------------------------------------------------------
// Dash style constants
//--------------------------------------------------------------------------
type DashStyle INT
const (
DashStyleSolid DashStyle = iota // 0
DashStyleDash // 1
DashStyleDot // 2
DashStyleDashDot // 3
DashStyleDashDotDot // 4
DashStyleCustom // 5
)
//--------------------------------------------------------------------------
// Dash cap constants
//--------------------------------------------------------------------------
type DashCap INT
const (
DashCapFlat DashCap = 0
DashCapRound DashCap = 2
DashCapTriangle DashCap = 3
)
//--------------------------------------------------------------------------
// Line cap constants (only the lowest 8 bits are used).
//--------------------------------------------------------------------------
type LineCap INT
const (
LineCapFlat LineCap = 0
LineCapSquare LineCap = 1
LineCapRound LineCap = 2
LineCapTriangle LineCap = 3
LineCapNoAnchor LineCap = 0x10 // corresponds to flat cap
LineCapSquareAnchor LineCap = 0x11 // corresponds to square cap
LineCapRoundAnchor LineCap = 0x12 // corresponds to round cap
LineCapDiamondAnchor LineCap = 0x13 // corresponds to triangle cap
LineCapArrowAnchor LineCap = 0x14 // no correspondence
LineCapCustom LineCap = 0xff // custom cap
LineCapAnchorMask LineCap = 0xf0 // mask to check for anchor or not.
)
//--------------------------------------------------------------------------
// Custom Line cap type constants
//--------------------------------------------------------------------------
type CustomLineCapType INT
const (
CustomLineCapTypeDefault CustomLineCapType = 0
CustomLineCapTypeAdjustableArrow CustomLineCapType = 1
)
//--------------------------------------------------------------------------
// Line join constants
//--------------------------------------------------------------------------
type LineJoin INT
const (
LineJoinMiter LineJoin = 0
LineJoinBevel LineJoin = 1
LineJoinRound LineJoin = 2
LineJoinMiterClipped LineJoin = 3
)
//--------------------------------------------------------------------------
// Path point types (only the lowest 8 bits are used.)
// The lowest 3 bits are interpreted as point type
// The higher 5 bits are reserved for flags.
//--------------------------------------------------------------------------
type PathPointType INT
const (
PathPointTypeStart PathPointType = 0 // move
PathPointTypeLine PathPointType = 1 // line
PathPointTypeBezier PathPointType = 3 // default Beizer (= cubic Bezier)
PathPointTypePathTypeMask PathPointType = 0x07 // type mask (lowest 3 bits).
PathPointTypeDashMode PathPointType = 0x10 // currently in dash mode.
PathPointTypePathMarker PathPointType = 0x20 // a marker for the path.
PathPointTypeCloseSubpath PathPointType = 0x80 // closed flag
// Path types used for advanced path.
PathPointTypeBezier2 PathPointType = 2 // quadratic Beizer
PathPointTypeBezier3 PathPointType = 3 // cubic Bezier
PathPointTypeBezier4 PathPointType = 4 // quartic (4th order) Beizer
PathPointTypeBezier5 PathPointType = 5 // quintic (5th order) Bezier
PathPointTypeBezier6 PathPointType = 6 // hexaic (6th order) Bezier
)
//--------------------------------------------------------------------------
// WarpMode constants
//--------------------------------------------------------------------------
type WarpMode INT
const (
WarpModePerspective WarpMode = iota // 0
WarpModeBilinear // 1
)
//--------------------------------------------------------------------------
// LineGradient Mode
//--------------------------------------------------------------------------
type LinearGradientMode INT
const (
LinearGradientModeHorizontal LinearGradientMode = iota // 0
LinearGradientModeVertical // 1
LinearGradientModeForwardDiagonal // 2
LinearGradientModeBackwardDiagonal // 3
)
//--------------------------------------------------------------------------
// Region Comine Modes
//--------------------------------------------------------------------------
type CombineMode INT
const (
CombineModeReplace CombineMode = iota // 0
CombineModeIntersect // 1
CombineModeUnion // 2
CombineModeXor // 3
CombineModeExclude // 4
CombineModeComplement // 5 (does exclude from)
)
//--------------------------------------------------------------------------
// Image types
//--------------------------------------------------------------------------
type ImageType INT
const (
ImageTypeUnknown = iota // 0
ImageTypeBitmap // 1
ImageTypeMetafile // 2
)
//--------------------------------------------------------------------------
// Interpolation modes
//--------------------------------------------------------------------------
type InterpolationMode int
const (
InterpolationModeInvalid InterpolationMode = InterpolationMode(QualityModeInvalid)
InterpolationModeDefault InterpolationMode = InterpolationMode(QualityModeDefault)
InterpolationModeLowQuality InterpolationMode = InterpolationMode(QualityModeLow)
InterpolationModeHighQuality InterpolationMode = InterpolationMode(QualityModeHigh)
InterpolationModeBilinear InterpolationMode = 3
InterpolationModeBicubic InterpolationMode = 4
InterpolationModeNearestNeighbor InterpolationMode = 5
InterpolationModeHighQualityBilinear InterpolationMode = 6
InterpolationModeHighQualityBicubic InterpolationMode = 7
)
//--------------------------------------------------------------------------
// Pen types
//--------------------------------------------------------------------------
type PenAlignment INT
const (
PenAlignmentCenter PenAlignment = 0
PenAlignmentInset PenAlignment = 1
PenAlignmentOutset PenAlignment = 2
PenAlignmentLeft PenAlignment = 3
PenAlignmentRight PenAlignment = 4
)
//--------------------------------------------------------------------------
// Brush types
//--------------------------------------------------------------------------
type BrushType int
const (
BrushTypeSolidColor BrushType = 0
BrushTypeHatchFill BrushType = 1
BrushTypeTextureFill BrushType = 2
BrushTypePathGradient BrushType = 3
BrushTypeLinearGradient BrushType = 4
)
//--------------------------------------------------------------------------
// Pen's Fill types
//--------------------------------------------------------------------------
type PenType int
const (
PenTypeSolidColor PenType = PenType(BrushTypeSolidColor)
PenTypeHatchFill PenType = PenType(BrushTypeHatchFill)
PenTypeTextureFill PenType = PenType(BrushTypeTextureFill)
PenTypePathGradient PenType = PenType(BrushTypePathGradient)
PenTypeLinearGradient PenType = PenType(BrushTypeLinearGradient)
PenTypeUnknown PenType = -1
)
//--------------------------------------------------------------------------
// Matrix Order
//--------------------------------------------------------------------------
type MatrixOrder INT
const (
MatrixOrderPrepend MatrixOrder = 0
MatrixOrderAppend MatrixOrder = 1
)
//--------------------------------------------------------------------------
// Generic font families
//--------------------------------------------------------------------------
type GenericFontFamily INT
const (
GenericFontFamilySerif GenericFontFamily = iota
GenericFontFamilySansSerif
GenericFontFamilyMonospace
)
//--------------------------------------------------------------------------
// FontStyle: face types and common styles
//--------------------------------------------------------------------------
// These should probably be flags
// Must have:
// Regular = 0
// Bold = 1
// Italic = 2
// BoldItalic = 3
type FontStyle INT
const (
FontStyleRegular FontStyle = 0
FontStyleBold FontStyle = 1
FontStyleItalic FontStyle = 2
FontStyleBoldItalic FontStyle = 3
FontStyleUnderline FontStyle = 4
FontStyleStrikeout FontStyle = 8
)
//---------------------------------------------------------------------------
// Smoothing Mode
//---------------------------------------------------------------------------
type SmoothingMode int
const (
SmoothingModeInvalid SmoothingMode = SmoothingMode(QualityModeInvalid)
SmoothingModeDefault SmoothingMode = SmoothingMode(QualityModeDefault)
SmoothingModeHighSpeed SmoothingMode = SmoothingMode(QualityModeLow)
SmoothingModeHighQuality SmoothingMode = SmoothingMode(QualityModeHigh)
SmoothingModeNone SmoothingMode = 3
SmoothingModeAntiAlias SmoothingMode = 4
//#if (GDIPVER >= 0x0110)
SmoothingModeAntiAlias8x4 = SmoothingModeAntiAlias
SmoothingModeAntiAlias8x8 = 5
//#endif //(GDIPVER >= 0x0110)
)
//---------------------------------------------------------------------------
// Pixel Format Mode
//---------------------------------------------------------------------------
type PixelOffsetMode int
const (
PixelOffsetModeInvalid PixelOffsetMode = PixelOffsetMode(QualityModeInvalid)
PixelOffsetModeDefault PixelOffsetMode = PixelOffsetMode(QualityModeDefault)
PixelOffsetModeHighSpeed PixelOffsetMode = PixelOffsetMode(QualityModeLow)
PixelOffsetModeHighQuality PixelOffsetMode = PixelOffsetMode(QualityModeHigh)
PixelOffsetModeNone PixelOffsetMode = 3 // no pixel offset
PixelOffsetModeHalf PixelOffsetMode = 4 // offset by -0.5, -0.5 for fast anti-alias perf
)
//---------------------------------------------------------------------------
// Text Rendering Hint
//---------------------------------------------------------------------------
type TextRenderingHint INT
const (
//#ifdef DCR_USE_NEW_186764
TextRenderingHintSystemDefault TextRenderingHint = 0 // Glyph with system default rendering hint
TextRenderingHintSingleBitPerPixelGridFit TextRenderingHint = 1 // Glyph bitmap with hinting
//#else
//TextRenderingHintSingleBitPerPixelGridFit TextRenderingHint = 0 // Glyph bitmap with hinting
//#endif // DCR_USE_NEW_186764
TextRenderingHintSingleBitPerPixel TextRenderingHint = 2 // Glyph bitmap without hinting
TextRenderingHintAntiAliasGridFit TextRenderingHint = 3 // Glyph anti-alias bitmap with hinting
TextRenderingHintAntiAlias TextRenderingHint = 4 // Glyph anti-alias bitmap without hinting
TextRenderingHintClearTypeGridFit TextRenderingHint = 5 // Glyph CT bitmap with hinting
)
//---------------------------------------------------------------------------
// Metafile Types
//---------------------------------------------------------------------------
type MetafileType INT
//const (
// MetafileTypeInvalid MetafileType = iota // Invalid metafile
// MetafileTypeWmf // Standard WMF
// MetafileTypeWmfAldus // Aldus Placeable Metafile format
// MetafileTypeEmf // EMF (not EMF+)
// MetafileTypeEmfPlusOnly // EMF+ without dual, down-level records
// MetafileTypeEmfPlusDual // EMF+ with dual, down-level records
//)
//---------------------------------------------------------------------------
// Metafile Types
//---------------------------------------------------------------------------
const (
MetafileTypeInvalid MetafileType = iota // Invalid metafile
MetafileTypeWmf // Standard WMF
MetafileTypeWmfPlaceable // Placeable WMF
MetafileTypeEmf // EMF (not EMF+)
MetafileTypeEmfPlusOnly // EMF+ without dual, down-level records
MetafileTypeEmfPlusDual // EMF+ with dual, down-level records
)
// Specifies the type of EMF to record
type EmfType INT
const (
EmfTypeEmfOnly EmfType = EmfType(MetafileTypeEmf) // no EMF+, only EMF
EmfTypeEmfPlusOnly EmfType = EmfType(MetafileTypeEmfPlusOnly) // no EMF, only EMF+
EmfTypeEmfPlusDual EmfType = EmfType(MetafileTypeEmfPlusDual) // both EMF+ and EMF
)
// All persistent objects must have a type listed here
type ObjectType INT
const (
ObjectTypeInvalid ObjectType = iota
ObjectTypeBrush
ObjectTypePen
ObjectTypePath
ObjectTypeRegion
ObjectTypeImage
ObjectTypeFont
ObjectTypeStringFormat
ObjectTypeImageAttributes
ObjectTypeCustomLineCap
//#if (GDIPVER >= 0x0110)
ObjectTypeGraphics
ObjectTypeMax = ObjectTypeGraphics
//#else
//ObjectTypeMax = ObjectTypeCustomLineCap
//#endif //(GDIPVER >= 0x0110)
ObjectTypeMin = ObjectTypeBrush
)
func ObjectTypeIsValid(typ ObjectType) bool {
return ((typ >= ObjectTypeMin) && (typ <= ObjectTypeMax))
}
//type RecordType INT
const (
META_EOF = 0x0000
META_REALIZEPALETTE = 0x0035
META_SETPALENTRIES = 0x0037
META_SETBKMODE = 0x0102
META_SETMAPMODE = 0x0103
META_SETROP2 = 0x0104
META_SETRELABS = 0x0105
META_SETPOLYFILLMODE = 0x0106
META_SETSTRETCHBLTMODE = 0x0107
META_SETTEXTCHAREXTRA = 0x0108
META_RESTOREDC = 0x0127
META_RESIZEPALETTE = 0x0139
META_DIBCREATEPATTERNBRUSH = 0x0142
META_SETLAYOUT = 0x0149
META_SETBKCOLOR = 0x0201
META_SETTEXTCOLOR = 0x0209
META_OFFSETVIEWPORTORG = 0x0211
META_LINETO = 0x0213
META_MOVETO = 0x0214
META_OFFSETCLIPRGN = 0x0220
META_FILLREGION = 0x0228
META_SETMAPPERFLAGS = 0x0231
META_SELECTPALETTE = 0x0234
META_POLYGON = 0x0324
META_POLYLINE = 0x0325
META_SETTEXTJUSTIFICATION = 0x020A
META_SETWINDOWORG = 0x020B
META_SETWINDOWEXT = 0x020C
META_SETVIEWPORTORG = 0x020D
META_SETVIEWPORTEXT = 0x020E
META_OFFSETWINDOWORG = 0x020F
META_SCALEWINDOWEXT = 0x0410
META_SCALEVIEWPORTEXT = 0x0412
META_EXCLUDECLIPRECT = 0x0415
META_INTERSECTCLIPRECT = 0x0416
META_ELLIPSE = 0x0418
META_FLOODFILL = 0x0419
META_FRAMEREGION = 0x0429
META_ANIMATEPALETTE = 0x0436
META_TEXTOUT = 0x0521
META_POLYPOLYGON = 0x0538
META_EXTFLOODFILL = 0x0548
META_RECTANGLE = 0x041B
META_SETPIXEL = 0x041F
META_ROUNDRECT = 0x061C
META_PATBLT = 0x061D
META_SAVEDC = 0x001E
META_PIE = 0x081A
META_STRETCHBLT = 0x0B23
META_ESCAPE = 0x0626
META_INVERTREGION = 0x012A
META_PAINTREGION = 0x012B
META_SELECTCLIPREGION = 0x012C
META_SELECTOBJECT = 0x012D
META_SETTEXTALIGN = 0x012E
META_ARC = 0x0817
META_CHORD = 0x0830
META_BITBLT = 0x0922
META_EXTTEXTOUT = 0x0a32
META_SETDIBTODEV = 0x0d33
META_DIBBITBLT = 0x0940
META_DIBSTRETCHBLT = 0x0b41
META_STRETCHDIB = 0x0f43
META_DELETEOBJECT = 0x01f0
META_CREATEPALETTE = 0x00f7
META_CREATEPATTERNBRUSH = 0x01F9
META_CREATEPENINDIRECT = 0x02FA
META_CREATEFONTINDIRECT = 0x02FB
META_CREATEBRUSHINDIRECT = 0x02FC
META_CREATEREGION = 0x06FF
)
//TEnhMetaRecord.iType 的可能值:
const (
EMR_HEADER = 1
EMR_POLYBEZIER = 2
EMR_POLYGON = 3
EMR_POLYLINE = 4
EMR_POLYBEZIERTO = 5
EMR_POLYLINETO = 6
EMR_POLYPOLYLINE = 7
EMR_POLYPOLYGON = 8
EMR_SETWINDOWEXTEX = 9
EMR_SETWINDOWORGEX = 10
EMR_SETVIEWPORTEXTEX = 11
EMR_SETVIEWPORTORGEX = 12
EMR_SETBRUSHORGEX = 13
EMR_EOF = 14
EMR_SETPIXELV = 15
EMR_SETMAPPERFLAGS = 0x10
EMR_SETMAPMODE = 17
EMR_SETBKMODE = 18
EMR_SETPOLYFILLMODE = 19
EMR_SETROP2 = 20
EMR_SETSTRETCHBLTMODE = 21
EMR_SETTEXTALIGN = 22
EMR_SETCOLORADJUSTMENT = 23
EMR_SETTEXTCOLOR = 24
EMR_SETBKCOLOR = 25
EMR_OFFSETCLIPRGN = 26
EMR_MOVETOEX = 27
EMR_SETMETARGN = 28
EMR_EXCLUDECLIPRECT = 29
EMR_INTERSECTCLIPRECT = 30
EMR_SCALEVIEWPORTEXTEX = 31
EMR_SCALEWINDOWEXTEX = 32
EMR_SAVEDC = 33
EMR_RESTOREDC = 34
EMR_SETWORLDTRANSFORM = 35
EMR_MODIFYWORLDTRANSFORM = 36
EMR_SELECTOBJECT = 37
EMR_CREATEPEN = 38
EMR_CREATEBRUSHINDIRECT = 39
EMR_DELETEOBJECT = 40
EMR_ANGLEARC = 41
EMR_ELLIPSE = 42
EMR_RECTANGLE = 43
EMR_ROUNDRECT = 44
EMR_ARC = 45
EMR_CHORD = 46
EMR_PIE = 47
EMR_SELECTPALETTE = 48
EMR_CREATEPALETTE = 49
EMR_SETPALETTEENTRIES = 50
EMR_RESIZEPALETTE = 51
EMR_REALIZEPALETTE = 52
EMR_EXTFLOODFILL = 53
EMR_LINETO = 54
EMR_ARCTO = 55
EMR_POLYDRAW = 56
EMR_SETARCDIRECTION = 57
EMR_SETMITERLIMIT = 58
EMR_BEGINPATH = 59
EMR_ENDPATH = 60
EMR_CLOSEFIGURE = 61
EMR_FILLPATH = 62
EMR_STROKEANDFILLPATH = 63
EMR_STROKEPATH = 0x40
EMR_FLATTENPATH = 65
EMR_WIDENPATH = 66
EMR_SELECTCLIPPATH = 67
EMR_ABORTPATH = 68
EMR_GDICOMMENT = 70
EMR_FILLRGN = 71
EMR_FRAMERGN = 72
EMR_INVERTRGN = 73
EMR_PAINTRGN = 74
EMR_EXTSELECTCLIPRGN = 75
EMR_BITBLT = 76
EMR_STRETCHBLT = 77
EMR_MASKBLT = 78
EMR_PLGBLT = 79
EMR_SETDIBITSTODEVICE = 80
EMR_STRETCHDIBITS = 81
EMR_EXTCREATEFONTINDIRECTW = 82
EMR_EXTTEXTOUTA = 83
EMR_EXTTEXTOUTW = 84
EMR_POLYBEZIER16 = 85
EMR_POLYGON16 = 86
EMR_POLYLINE16 = 87
EMR_POLYBEZIERTO16 = 88
EMR_POLYLINETO16 = 89
EMR_POLYPOLYLINE16 = 90
EMR_POLYPOLYGON16 = 91
EMR_POLYDRAW16 = 92
EMR_CREATEMONOBRUSH = 93
EMR_CREATEDIBPATTERNBRUSHPT = 94
EMR_EXTCREATEPEN = 95
EMR_POLYTEXTOUTA = 96
EMR_POLYTEXTOUTW = 97
EMR_SETICMMODE = 98
EMR_CREATECOLORSPACE = 99
EMR_SETCOLORSPACE = 100
EMR_DELETECOLORSPACE = 101
EMR_GLSRECORD = 102
EMR_GLSBOUNDEDRECORD = 103
EMR_PIXELFORMAT = 104
EMR_DRAWESCAPE = 105
EMR_EXTESCAPE = 106
EMR_STARTDOC = 107
EMR_SMALLTEXTOUT = 108
EMR_FORCEUFIMAPPING = 109
EMR_NAMEDESCAPE = 110
EMR_COLORCORRECTPALETTE = 111
EMR_SETICMPROFILEA = 112
EMR_SETICMPROFILEW = 113
EMR_ALPHABLEND = 114
EMR_ALPHADIBBLEND = 115
EMR_TRANSPARENTBLT = 116
EMR_TRANSPARENTDIB = 117
EMR_GRADIENTFILL = 118
EMR_SETLINKEDUFIS = 119
EMR_SETTEXTJUSTIFICATION = 120
)
const GDIP_EMFPLUS_RECORD_BASE INT = 0x00004000
const GDIP_WMF_RECORD_BASE INT = 0x00010000
func GDIP_WMF_RECORD_TO_EMFPLUS(n INT) INT { return n | GDIP_WMF_RECORD_BASE }
func GDIP_EMFPLUS_RECORD_TO_WMF(n INT) INT { return n & (^GDIP_WMF_RECORD_BASE) }
func GDIP_IS_WMF_RECORDTYPE(n INT) bool { return (n & GDIP_WMF_RECORD_BASE) != 0 }
type EmfPlusRecordType INT
var (
// Since we have to enumerate GDI records right along with GDI+ records
// we list all the GDI records here so that they can be part of the
// same enumeration type which is used in the enumeration callback.
WmfRecordTypeSetBkColor EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKCOLOR))
WmfRecordTypeSetBkMode EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETBKMODE))
WmfRecordTypeSetMapMode EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPMODE))
WmfRecordTypeSetROP2 EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETROP2))
WmfRecordTypeSetRelAbs EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETRELABS))
WmfRecordTypeSetPolyFillMode EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPOLYFILLMODE))
WmfRecordTypeSetStretchBltMode EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETSTRETCHBLTMODE))
WmfRecordTypeSetTextCharExtra EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCHAREXTRA))
WmfRecordTypeSetTextColor EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTCOLOR))
WmfRecordTypeSetTextJustification EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTJUSTIFICATION))
WmfRecordTypeSetWindowOrg EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWORG))
WmfRecordTypeSetWindowExt EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETWINDOWEXT))
WmfRecordTypeSetViewportOrg EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTORG))
WmfRecordTypeSetViewportExt EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETVIEWPORTEXT))
WmfRecordTypeOffsetWindowOrg EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETWINDOWORG))
WmfRecordTypeScaleWindowExt EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEWINDOWEXT))
WmfRecordTypeOffsetViewportOrg EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETVIEWPORTORG))
WmfRecordTypeScaleViewportExt EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SCALEVIEWPORTEXT))
WmfRecordTypeLineTo EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_LINETO))
WmfRecordTypeMoveTo EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_MOVETO))
WmfRecordTypeExcludeClipRect EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_EXCLUDECLIPRECT))
WmfRecordTypeIntersectClipRect EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_INTERSECTCLIPRECT))
WmfRecordTypeArc EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_ARC))
WmfRecordTypeEllipse EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_ELLIPSE))
WmfRecordTypeFloodFill EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_FLOODFILL))
WmfRecordTypePie EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_PIE))
WmfRecordTypeRectangle EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_RECTANGLE))
WmfRecordTypeRoundRect EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_ROUNDRECT))
WmfRecordTypePatBlt EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_PATBLT))
WmfRecordTypeSaveDC EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SAVEDC))
WmfRecordTypeSetPixel EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPIXEL))
WmfRecordTypeOffsetClipRgn EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_OFFSETCLIPRGN))
WmfRecordTypeTextOut EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_TEXTOUT))
WmfRecordTypeBitBlt EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_BITBLT))
WmfRecordTypeStretchBlt EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHBLT))
WmfRecordTypePolygon EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYGON))
WmfRecordTypePolyline EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYLINE))
WmfRecordTypeEscape EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_ESCAPE))
WmfRecordTypeRestoreDC EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_RESTOREDC))
WmfRecordTypeFillRegion EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_FILLREGION))
WmfRecordTypeFrameRegion EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_FRAMEREGION))
WmfRecordTypeInvertRegion EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_INVERTREGION))
WmfRecordTypePaintRegion EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_PAINTREGION))
WmfRecordTypeSelectClipRegion EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTCLIPREGION))
WmfRecordTypeSelectObject EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTOBJECT))
WmfRecordTypeSetTextAlign EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETTEXTALIGN))
WmfRecordTypeDrawText EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x062F)) // META_DRAWTEXT
WmfRecordTypeChord EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_CHORD))
WmfRecordTypeSetMapperFlags EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETMAPPERFLAGS))
WmfRecordTypeExtTextOut EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTTEXTOUT))
WmfRecordTypeSetDIBToDev EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETDIBTODEV))
WmfRecordTypeSelectPalette EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SELECTPALETTE))
WmfRecordTypeRealizePalette EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_REALIZEPALETTE))
WmfRecordTypeAnimatePalette EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_ANIMATEPALETTE))
WmfRecordTypeSetPalEntries EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_SETPALENTRIES))
WmfRecordTypePolyPolygon EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_POLYPOLYGON))
WmfRecordTypeResizePalette EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_RESIZEPALETTE))
WmfRecordTypeDIBBitBlt EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBBITBLT))
WmfRecordTypeDIBStretchBlt EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBSTRETCHBLT))
WmfRecordTypeDIBCreatePatternBrush EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_DIBCREATEPATTERNBRUSH))
WmfRecordTypeStretchDIB EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_STRETCHDIB))
WmfRecordTypeExtFloodFill EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_EXTFLOODFILL))
WmfRecordTypeSetLayout EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x0149)) // META_SETLAYOUT
WmfRecordTypeResetDC EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x014C)) // META_RESETDC
WmfRecordTypeStartDoc EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x014D)) // META_STARTDOC
WmfRecordTypeStartPage EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x004F)) // META_STARTPAGE
WmfRecordTypeEndPage EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x0050)) // META_ENDPAGE
WmfRecordTypeAbortDoc EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x0052)) // META_ABORTDOC
WmfRecordTypeEndDoc EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x005E)) // META_ENDDOC
WmfRecordTypeDeleteObject EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_DELETEOBJECT))
WmfRecordTypeCreatePalette EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPALETTE))
WmfRecordTypeCreateBrush EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x00F8)) // META_CREATEBRUSH
WmfRecordTypeCreatePatternBrush EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPATTERNBRUSH))
WmfRecordTypeCreatePenIndirect EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEPENINDIRECT))
WmfRecordTypeCreateFontIndirect EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEFONTINDIRECT))
WmfRecordTypeCreateBrushIndirect EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEBRUSHINDIRECT))
WmfRecordTypeCreateBitmapIndirect EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x02FD)) // META_CREATEBITMAPINDIRECT
WmfRecordTypeCreateBitmap EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(0x06FE)) // META_CREATEBITMAP
WmfRecordTypeCreateRegion EmfPlusRecordType = EmfPlusRecordType(GDIP_WMF_RECORD_TO_EMFPLUS(META_CREATEREGION))
EmfRecordTypeHeader EmfPlusRecordType = EMR_HEADER
EmfRecordTypePolyBezier EmfPlusRecordType = EMR_POLYBEZIER
EmfRecordTypePolygon EmfPlusRecordType = EMR_POLYGON
EmfRecordTypePolyline EmfPlusRecordType = EMR_POLYLINE
EmfRecordTypePolyBezierTo EmfPlusRecordType = EMR_POLYBEZIERTO
EmfRecordTypePolyLineTo EmfPlusRecordType = EMR_POLYLINETO
EmfRecordTypePolyPolyline EmfPlusRecordType = EMR_POLYPOLYLINE
EmfRecordTypePolyPolygon EmfPlusRecordType = EMR_POLYPOLYGON
EmfRecordTypeSetWindowExtEx EmfPlusRecordType = EMR_SETWINDOWEXTEX
EmfRecordTypeSetWindowOrgEx EmfPlusRecordType = EMR_SETWINDOWORGEX
EmfRecordTypeSetViewportExtEx EmfPlusRecordType = EMR_SETVIEWPORTEXTEX
EmfRecordTypeSetViewportOrgEx EmfPlusRecordType = EMR_SETVIEWPORTORGEX
EmfRecordTypeSetBrushOrgEx EmfPlusRecordType = EMR_SETBRUSHORGEX
EmfRecordTypeEOF EmfPlusRecordType = EMR_EOF
EmfRecordTypeSetPixelV EmfPlusRecordType = EMR_SETPIXELV
EmfRecordTypeSetMapperFlags EmfPlusRecordType = EMR_SETMAPPERFLAGS
EmfRecordTypeSetMapMode EmfPlusRecordType = EMR_SETMAPMODE
EmfRecordTypeSetBkMode EmfPlusRecordType = EMR_SETBKMODE
EmfRecordTypeSetPolyFillMode EmfPlusRecordType = EMR_SETPOLYFILLMODE
EmfRecordTypeSetROP2 EmfPlusRecordType = EMR_SETROP2
EmfRecordTypeSetStretchBltMode EmfPlusRecordType = EMR_SETSTRETCHBLTMODE
EmfRecordTypeSetTextAlign EmfPlusRecordType = EMR_SETTEXTALIGN
EmfRecordTypeSetColorAdjustment EmfPlusRecordType = EMR_SETCOLORADJUSTMENT
EmfRecordTypeSetTextColor EmfPlusRecordType = EMR_SETTEXTCOLOR
EmfRecordTypeSetBkColor EmfPlusRecordType = EMR_SETBKCOLOR
EmfRecordTypeOffsetClipRgn EmfPlusRecordType = EMR_OFFSETCLIPRGN
EmfRecordTypeMoveToEx EmfPlusRecordType = EMR_MOVETOEX
EmfRecordTypeSetMetaRgn EmfPlusRecordType = EMR_SETMETARGN
EmfRecordTypeExcludeClipRect EmfPlusRecordType = EMR_EXCLUDECLIPRECT
EmfRecordTypeIntersectClipRect EmfPlusRecordType = EMR_INTERSECTCLIPRECT
EmfRecordTypeScaleViewportExtEx EmfPlusRecordType = EMR_SCALEVIEWPORTEXTEX
EmfRecordTypeScaleWindowExtEx EmfPlusRecordType = EMR_SCALEWINDOWEXTEX
EmfRecordTypeSaveDC EmfPlusRecordType = EMR_SAVEDC
EmfRecordTypeRestoreDC EmfPlusRecordType = EMR_RESTOREDC
EmfRecordTypeSetWorldTransform EmfPlusRecordType = EMR_SETWORLDTRANSFORM
EmfRecordTypeModifyWorldTransform EmfPlusRecordType = EMR_MODIFYWORLDTRANSFORM
EmfRecordTypeSelectObject EmfPlusRecordType = EMR_SELECTOBJECT
EmfRecordTypeCreatePen EmfPlusRecordType = EMR_CREATEPEN
EmfRecordTypeCreateBrushIndirect EmfPlusRecordType = EMR_CREATEBRUSHINDIRECT
EmfRecordTypeDeleteObject EmfPlusRecordType = EMR_DELETEOBJECT
EmfRecordTypeAngleArc EmfPlusRecordType = EMR_ANGLEARC
EmfRecordTypeEllipse EmfPlusRecordType = EMR_ELLIPSE
EmfRecordTypeRectangle EmfPlusRecordType = EMR_RECTANGLE
EmfRecordTypeRoundRect EmfPlusRecordType = EMR_ROUNDRECT
EmfRecordTypeArc EmfPlusRecordType = EMR_ARC
EmfRecordTypeChord EmfPlusRecordType = EMR_CHORD
EmfRecordTypePie EmfPlusRecordType = EMR_PIE
EmfRecordTypeSelectPalette EmfPlusRecordType = EMR_SELECTPALETTE
EmfRecordTypeCreatePalette EmfPlusRecordType = EMR_CREATEPALETTE
EmfRecordTypeSetPaletteEntries EmfPlusRecordType = EMR_SETPALETTEENTRIES
EmfRecordTypeResizePalette EmfPlusRecordType = EMR_RESIZEPALETTE
EmfRecordTypeRealizePalette EmfPlusRecordType = EMR_REALIZEPALETTE
EmfRecordTypeExtFloodFill EmfPlusRecordType = EMR_EXTFLOODFILL
EmfRecordTypeLineTo EmfPlusRecordType = EMR_LINETO
EmfRecordTypeArcTo EmfPlusRecordType = EMR_ARCTO
EmfRecordTypePolyDraw EmfPlusRecordType = EMR_POLYDRAW
EmfRecordTypeSetArcDirection EmfPlusRecordType = EMR_SETARCDIRECTION
EmfRecordTypeSetMiterLimit EmfPlusRecordType = EMR_SETMITERLIMIT
EmfRecordTypeBeginPath EmfPlusRecordType = EMR_BEGINPATH
EmfRecordTypeEndPath EmfPlusRecordType = EMR_ENDPATH
EmfRecordTypeCloseFigure EmfPlusRecordType = EMR_CLOSEFIGURE
EmfRecordTypeFillPath EmfPlusRecordType = EMR_FILLPATH
EmfRecordTypeStrokeAndFillPath EmfPlusRecordType = EMR_STROKEANDFILLPATH
EmfRecordTypeStrokePath EmfPlusRecordType = EMR_STROKEPATH
EmfRecordTypeFlattenPath EmfPlusRecordType = EMR_FLATTENPATH
EmfRecordTypeWidenPath EmfPlusRecordType = EMR_WIDENPATH
EmfRecordTypeSelectClipPath EmfPlusRecordType = EMR_SELECTCLIPPATH
EmfRecordTypeAbortPath EmfPlusRecordType = EMR_ABORTPATH
EmfRecordTypeReserved_069 EmfPlusRecordType = 69 // Not Used
EmfRecordTypeGdiComment EmfPlusRecordType = EMR_GDICOMMENT
EmfRecordTypeFillRgn EmfPlusRecordType = EMR_FILLRGN
EmfRecordTypeFrameRgn EmfPlusRecordType = EMR_FRAMERGN
EmfRecordTypeInvertRgn EmfPlusRecordType = EMR_INVERTRGN
EmfRecordTypePaintRgn EmfPlusRecordType = EMR_PAINTRGN
EmfRecordTypeExtSelectClipRgn EmfPlusRecordType = EMR_EXTSELECTCLIPRGN
EmfRecordTypeBitBlt EmfPlusRecordType = EMR_BITBLT
EmfRecordTypeStretchBlt EmfPlusRecordType = EMR_STRETCHBLT
EmfRecordTypeMaskBlt EmfPlusRecordType = EMR_MASKBLT
EmfRecordTypePlgBlt EmfPlusRecordType = EMR_PLGBLT
EmfRecordTypeSetDIBitsToDevice EmfPlusRecordType = EMR_SETDIBITSTODEVICE
EmfRecordTypeStretchDIBits EmfPlusRecordType = EMR_STRETCHDIBITS
EmfRecordTypeExtCreateFontIndirect EmfPlusRecordType = EMR_EXTCREATEFONTINDIRECTW
EmfRecordTypeExtTextOutA EmfPlusRecordType = EMR_EXTTEXTOUTA
EmfRecordTypeExtTextOutW EmfPlusRecordType = EMR_EXTTEXTOUTW
EmfRecordTypePolyBezier16 EmfPlusRecordType = EMR_POLYBEZIER16
EmfRecordTypePolygon16 EmfPlusRecordType = EMR_POLYGON16
EmfRecordTypePolyline16 EmfPlusRecordType = EMR_POLYLINE16
EmfRecordTypePolyBezierTo16 EmfPlusRecordType = EMR_POLYBEZIERTO16
EmfRecordTypePolylineTo16 EmfPlusRecordType = EMR_POLYLINETO16
EmfRecordTypePolyPolyline16 EmfPlusRecordType = EMR_POLYPOLYLINE16
EmfRecordTypePolyPolygon16 EmfPlusRecordType = EMR_POLYPOLYGON16
EmfRecordTypePolyDraw16 EmfPlusRecordType = EMR_POLYDRAW16
EmfRecordTypeCreateMonoBrush EmfPlusRecordType = EMR_CREATEMONOBRUSH
EmfRecordTypeCreateDIBPatternBrushPt EmfPlusRecordType = EMR_CREATEDIBPATTERNBRUSHPT
EmfRecordTypeExtCreatePen EmfPlusRecordType = EMR_EXTCREATEPEN
EmfRecordTypePolyTextOutA EmfPlusRecordType = EMR_POLYTEXTOUTA
EmfRecordTypePolyTextOutW EmfPlusRecordType = EMR_POLYTEXTOUTW
EmfRecordTypeSetICMMode EmfPlusRecordType = 98 // EMR_SETICMMODE
EmfRecordTypeCreateColorSpace EmfPlusRecordType = 99 // EMR_CREATECOLORSPACE
EmfRecordTypeSetColorSpace EmfPlusRecordType = 100 // EMR_SETCOLORSPACE
EmfRecordTypeDeleteColorSpace EmfPlusRecordType = 101 // EMR_DELETECOLORSPACE
EmfRecordTypeGLSRecord EmfPlusRecordType = 102 // EMR_GLSRECORD
EmfRecordTypeGLSBoundedRecord EmfPlusRecordType = 103 // EMR_GLSBOUNDEDRECORD
EmfRecordTypePixelFormat EmfPlusRecordType = 104 // EMR_PIXELFORMAT
EmfRecordTypeDrawEscape EmfPlusRecordType = 105 // EMR_RESERVED_105
EmfRecordTypeExtEscape EmfPlusRecordType = 106 // EMR_RESERVED_106
EmfRecordTypeStartDoc EmfPlusRecordType = 107 // EMR_RESERVED_107
EmfRecordTypeSmallTextOut EmfPlusRecordType = 108 // EMR_RESERVED_108
EmfRecordTypeForceUFIMapping EmfPlusRecordType = 109 // EMR_RESERVED_109
EmfRecordTypeNamedEscape EmfPlusRecordType = 110 // EMR_RESERVED_110
EmfRecordTypeColorCorrectPalette EmfPlusRecordType = 111 // EMR_COLORCORRECTPALETTE
EmfRecordTypeSetICMProfileA EmfPlusRecordType = 112 // EMR_SETICMPROFILEA
EmfRecordTypeSetICMProfileW EmfPlusRecordType = 113 // EMR_SETICMPROFILEW
EmfRecordTypeAlphaBlend EmfPlusRecordType = 114 // EMR_ALPHABLEND
EmfRecordTypeSetLayout EmfPlusRecordType = 115 // EMR_SETLAYOUT
EmfRecordTypeTransparentBlt EmfPlusRecordType = 116 // EMR_TRANSPARENTBLT
EmfRecordTypeReserved_117 EmfPlusRecordType = 117 // Not Used
EmfRecordTypeGradientFill EmfPlusRecordType = 118 // EMR_GRADIENTFILL
EmfRecordTypeSetLinkedUFIs EmfPlusRecordType = 119 // EMR_RESERVED_119
EmfRecordTypeSetTextJustification EmfPlusRecordType = 120 // EMR_RESERVED_120
EmfRecordTypeColorMatchToTargetW EmfPlusRecordType = 121 // EMR_COLORMATCHTOTARGETW
EmfRecordTypeCreateColorSpaceW EmfPlusRecordType = 122 // EMR_CREATECOLORSPACEW
EmfRecordTypeMax EmfPlusRecordType = 122
EmfRecordTypeMin EmfPlusRecordType = 1
// That is the END of the GDI EMF records.
// Now we start the list of EMF+ records. We leave quite
// a bit of room here for the addition of any new GDI
// records that may be added later.
)
const (
EmfPlusRecordTypeInvalid EmfPlusRecordType = EmfPlusRecordType(GDIP_EMFPLUS_RECORD_BASE)
EmfPlusRecordTypeHeader EmfPlusRecordType = EmfPlusRecordTypeInvalid + 1
EmfPlusRecordTypeEndOfFile EmfPlusRecordType = EmfPlusRecordTypeInvalid + 2
EmfPlusRecordTypeComment EmfPlusRecordType = EmfPlusRecordTypeInvalid + 3
EmfPlusRecordTypeGetDC EmfPlusRecordType = EmfPlusRecordTypeInvalid + 4 // the application grabbed the metafile dc
EmfPlusRecordTypeMultiFormatStart EmfPlusRecordType = EmfPlusRecordTypeInvalid + 5
EmfPlusRecordTypeMultiFormatSection EmfPlusRecordType = EmfPlusRecordTypeInvalid + 6
EmfPlusRecordTypeMultiFormatEnd EmfPlusRecordType = EmfPlusRecordTypeInvalid + 7
// For all persistent objects
EmfPlusRecordTypeObject EmfPlusRecordType = EmfPlusRecordTypeInvalid + 8 // brushpenpathregionimagefontstring-format
// Drawing Records
EmfPlusRecordTypeClear EmfPlusRecordType = EmfPlusRecordTypeInvalid + 9
EmfPlusRecordTypeFillRects EmfPlusRecordType = EmfPlusRecordTypeInvalid + 10
EmfPlusRecordTypeDrawRects EmfPlusRecordType = EmfPlusRecordTypeInvalid + 11
EmfPlusRecordTypeFillPolygon EmfPlusRecordType = EmfPlusRecordTypeInvalid + 12
EmfPlusRecordTypeDrawLines EmfPlusRecordType = EmfPlusRecordTypeInvalid + 13
EmfPlusRecordTypeFillEllipse EmfPlusRecordType = EmfPlusRecordTypeInvalid + 14
EmfPlusRecordTypeDrawEllipse EmfPlusRecordType = EmfPlusRecordTypeInvalid + 15