-
Notifications
You must be signed in to change notification settings - Fork 3
/
D2D1.h
6996 lines (5395 loc) · 231 KB
/
D2D1.h
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
//---------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This file is automatically generated. Please do not edit it directly.
//
// File name: D2D1.h
//---------------------------------------------------------------------------
#pragma once
#ifndef _D2D1_H_
#define _D2D1_H_
#ifndef COM_NO_WINDOWS_H
#include <windows.h>
#endif // #ifndef COM_NO_WINDOWS_H
#include <unknwn.h>
#include <dcommon.h>
#include <D2DErr.h>
#include <D2DBaseTypes.h>
#include <dxgiformat.h>
#ifndef D2D_NO_INCLUDE_D3D10
#include <d3d10_1.h>
#endif // #ifndef D2D_NO_INCLUDE_D3D10
#ifndef D2D_USE_C_DEFINITIONS
//
// We use the 'C' definitions if C++ is not defined
//
#ifndef __cplusplus
#define D2D_USE_C_DEFINITIONS
#endif
#endif // #ifndef D2D_USE_C_DEFINITIONS
#ifndef D2D1_DECLARE_INTERFACE
#define D2D1_DECLARE_INTERFACE(X) DECLSPEC_UUID(X) DECLSPEC_NOVTABLE
#endif
//
// Forward declarations here
//
typedef interface IDWriteTextFormat IDWriteTextFormat;
typedef interface IDWriteTextLayout IDWriteTextLayout;
typedef interface IDWriteRenderingParams IDWriteRenderingParams;
typedef interface IDXGISurface IDXGISurface;
typedef interface IWICBitmap IWICBitmap;
typedef interface IWICBitmapSource IWICBitmapSource;
typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN;
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1Factory;
interface ID2D1RenderTarget;
interface ID2D1BitmapRenderTarget;
interface ID2D1SimplifiedGeometrySink;
interface ID2D1TessellationSink;
interface ID2D1Geometry;
interface ID2D1Brush;
#else
typedef interface ID2D1Factory ID2D1Factory;
typedef interface ID2D1RenderTarget ID2D1RenderTarget;
typedef interface ID2D1BitmapRenderTarget ID2D1BitmapRenderTarget;
typedef interface ID2D1SimplifiedGeometrySink ID2D1SimplifiedGeometrySink;;
typedef interface ID2D1TessellationSink ID2D1TessellationSink;
typedef interface ID2D1Geometry ID2D1Geometry;
typedef interface ID2D1Brush ID2D1Brush;
#endif
#define D2D1_INVALID_TAG ULONGLONG_MAX
#define D2D1_DEFAULT_FLATTENING_TOLERANCE (0.25f)
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_ALPHA_MODE
//
// Synopsis:
// Qualifies how alpha is to be treated in a bitmap or render target containing
// alpha.
//
//------------------------------------------------------------------------------
typedef enum D2D1_ALPHA_MODE
{
//
// Alpha mode should be determined implicitly. Some target surfaces do not supply
// or imply this information in which case alpha must be specified.
//
D2D1_ALPHA_MODE_UNKNOWN = 0,
//
// Treat the alpha as premultipled.
//
D2D1_ALPHA_MODE_PREMULTIPLIED = 1,
//
// Opacity is in the 'A' component only.
//
D2D1_ALPHA_MODE_STRAIGHT = 2,
//
// Ignore any alpha channel information.
//
D2D1_ALPHA_MODE_IGNORE = 3,
D2D1_ALPHA_MODE_FORCE_DWORD = 0xffffffff
} D2D1_ALPHA_MODE;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_GAMMA
//
// Synopsis:
// This determines what gamma is used for interpolation/blending.
//
//------------------------------------------------------------------------------
typedef enum D2D1_GAMMA
{
//
// Colors are manipulated in 2.2 gamma color space.
//
D2D1_GAMMA_2_2 = 0,
//
// Colors are manipulated in 1.0 gamma color space.
//
D2D1_GAMMA_1_0 = 1,
D2D1_GAMMA_FORCE_DWORD = 0xffffffff
} D2D1_GAMMA;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_OPACITY_MASK_CONTENT
//
// Synopsis:
// Specifies what the contents are of an opacity mask.
//
//------------------------------------------------------------------------------
typedef enum D2D1_OPACITY_MASK_CONTENT
{
//
// The mask contains geometries or bitmaps.
//
D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0,
//
// The mask contains text rendered using one of the natural text modes.
//
D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1,
//
// The mask contains text rendered using one of the GDI compatible text modes.
//
D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2,
D2D1_OPACITY_MASK_CONTENT_FORCE_DWORD = 0xffffffff
} D2D1_OPACITY_MASK_CONTENT;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_EXTEND_MODE
//
// Synopsis:
// Enum which descibes how to sample from a source outside it's base tile.
//
//------------------------------------------------------------------------------
typedef enum D2D1_EXTEND_MODE
{
//
// Extend the edges of the source out by clamping sample points outside the source
// to the edges.
//
D2D1_EXTEND_MODE_CLAMP = 0,
//
// The base tile is drawn untransformed and the remainder are filled by repeating
// the base tile.
//
D2D1_EXTEND_MODE_WRAP = 1,
//
// The same as wrap, but alternate tiles are flipped The base tile is drawn
// untransformed.
//
D2D1_EXTEND_MODE_MIRROR = 2,
D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff
} D2D1_EXTEND_MODE;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_ANTIALIAS_MODE
//
// Synopsis:
// Enum which descibes the manner in which we render edges of non-text primitives.
//
//------------------------------------------------------------------------------
typedef enum D2D1_ANTIALIAS_MODE
{
//
// The edges of each primitive are antialiased sequentially.
//
D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0,
//
// Each pixel is rendered if its pixel center is contained by the geometry.
//
D2D1_ANTIALIAS_MODE_ALIASED = 1,
D2D1_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff
} D2D1_ANTIALIAS_MODE;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_TEXT_ANTIALIAS_MODE
//
//------------------------------------------------------------------------------
typedef enum D2D1_TEXT_ANTIALIAS_MODE
{
//
// Render text using the current system setting.
//
D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0,
//
// Render text using ClearType.
//
D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1,
//
// Render text using gray-scale.
//
D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2,
//
// Render text aliased.
//
D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3,
D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff
} D2D1_TEXT_ANTIALIAS_MODE;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_BITMAP_INTERPOLATION_MODE
//
//------------------------------------------------------------------------------
typedef enum D2D1_BITMAP_INTERPOLATION_MODE
{
//
// Nearest Neighbor filtering. Also known as nearest pixel or nearest point
// sampling.
//
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0,
//
// Linear filtering.
//
D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = 1,
D2D1_BITMAP_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff
} D2D1_BITMAP_INTERPOLATION_MODE;
//+-----------------------------------------------------------------------------
//
// Flag:
// D2D1_DRAW_TEXT_OPTIONS
//
// Synopsis:
// Modifications made to the draw text call that influence how the text is
// rendered.
//
//------------------------------------------------------------------------------
typedef enum D2D1_DRAW_TEXT_OPTIONS
{
//
// Do not snap the baseline of the text vertically.
//
D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001,
//
// Clip the text to the content bounds.
//
D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002,
D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000,
D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD = 0xffffffff
} D2D1_DRAW_TEXT_OPTIONS;
DEFINE_ENUM_FLAG_OPERATORS(D2D1_DRAW_TEXT_OPTIONS);
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_PIXEL_FORMAT
//
//------------------------------------------------------------------------------
typedef struct D2D1_PIXEL_FORMAT
{
DXGI_FORMAT format;
D2D1_ALPHA_MODE alphaMode;
} D2D1_PIXEL_FORMAT;
typedef D2D_POINT_2U D2D1_POINT_2U;
typedef D2D_POINT_2F D2D1_POINT_2F;
typedef D2D_RECT_F D2D1_RECT_F;
typedef D2D_RECT_U D2D1_RECT_U;
typedef D2D_SIZE_F D2D1_SIZE_F;
typedef D2D_SIZE_U D2D1_SIZE_U;
typedef D2D_COLOR_F D2D1_COLOR_F;
typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F;
typedef UINT64 D2D1_TAG;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_BITMAP_PROPERTIES
//
//------------------------------------------------------------------------------
typedef struct D2D1_BITMAP_PROPERTIES
{
D2D1_PIXEL_FORMAT pixelFormat;
FLOAT dpiX;
FLOAT dpiY;
} D2D1_BITMAP_PROPERTIES;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_GRADIENT_STOP
//
//------------------------------------------------------------------------------
typedef struct D2D1_GRADIENT_STOP
{
FLOAT position;
D2D1_COLOR_F color;
} D2D1_GRADIENT_STOP;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_BRUSH_PROPERTIES
//
//------------------------------------------------------------------------------
typedef struct D2D1_BRUSH_PROPERTIES
{
FLOAT opacity;
D2D1_MATRIX_3X2_F transform;
} D2D1_BRUSH_PROPERTIES;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_BITMAP_BRUSH_PROPERTIES
//
//------------------------------------------------------------------------------
typedef struct D2D1_BITMAP_BRUSH_PROPERTIES
{
D2D1_EXTEND_MODE extendModeX;
D2D1_EXTEND_MODE extendModeY;
D2D1_BITMAP_INTERPOLATION_MODE interpolationMode;
} D2D1_BITMAP_BRUSH_PROPERTIES;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
//
//------------------------------------------------------------------------------
typedef struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
{
D2D1_POINT_2F startPoint;
D2D1_POINT_2F endPoint;
} D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
//
//------------------------------------------------------------------------------
typedef struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
{
D2D1_POINT_2F center;
D2D1_POINT_2F gradientOriginOffset;
FLOAT radiusX;
FLOAT radiusY;
} D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_ARC_SIZE
//
// Synopsis:
// Differentiates which of the two possible arcs could match the given arc
// parameters.
//
//------------------------------------------------------------------------------
typedef enum D2D1_ARC_SIZE
{
D2D1_ARC_SIZE_SMALL = 0,
D2D1_ARC_SIZE_LARGE = 1,
D2D1_ARC_SIZE_FORCE_DWORD = 0xffffffff
} D2D1_ARC_SIZE;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_CAP_STYLE
//
// Synopsis:
// Enum which descibes the drawing of the ends of a line.
//
//------------------------------------------------------------------------------
typedef enum D2D1_CAP_STYLE
{
//
// Flat line cap.
//
D2D1_CAP_STYLE_FLAT = 0,
//
// Square line cap.
//
D2D1_CAP_STYLE_SQUARE = 1,
//
// Round line cap.
//
D2D1_CAP_STYLE_ROUND = 2,
//
// Triangle line cap.
//
D2D1_CAP_STYLE_TRIANGLE = 3,
D2D1_CAP_STYLE_FORCE_DWORD = 0xffffffff
} D2D1_CAP_STYLE;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_DASH_STYLE
//
//------------------------------------------------------------------------------
typedef enum D2D1_DASH_STYLE
{
D2D1_DASH_STYLE_SOLID = 0,
D2D1_DASH_STYLE_DASH = 1,
D2D1_DASH_STYLE_DOT = 2,
D2D1_DASH_STYLE_DASH_DOT = 3,
D2D1_DASH_STYLE_DASH_DOT_DOT = 4,
D2D1_DASH_STYLE_CUSTOM = 5,
D2D1_DASH_STYLE_FORCE_DWORD = 0xffffffff
} D2D1_DASH_STYLE;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_LINE_JOIN
//
// Synopsis:
// Enum which descibes the drawing of the corners on the line.
//
//------------------------------------------------------------------------------
typedef enum D2D1_LINE_JOIN
{
//
// Miter join.
//
D2D1_LINE_JOIN_MITER = 0,
//
// Bevel join.
//
D2D1_LINE_JOIN_BEVEL = 1,
//
// Round join.
//
D2D1_LINE_JOIN_ROUND = 2,
//
// Miter/Bevel join.
//
D2D1_LINE_JOIN_MITER_OR_BEVEL = 3,
D2D1_LINE_JOIN_FORCE_DWORD = 0xffffffff
} D2D1_LINE_JOIN;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_COMBINE_MODE
//
// Synopsis:
// This enumeration describes the type of combine operation to be performed.
//
//------------------------------------------------------------------------------
typedef enum D2D1_COMBINE_MODE
{
//
// Produce a geometry representing the set of points contained in either
// the first or the second geometry.
//
D2D1_COMBINE_MODE_UNION = 0,
//
// Produce a geometry representing the set of points common to the first
// and the second geometries.
//
D2D1_COMBINE_MODE_INTERSECT = 1,
//
// Produce a geometry representing the set of points contained in the
// first geometry or the second geometry, but not both.
//
D2D1_COMBINE_MODE_XOR = 2,
//
// Produce a geometry representing the set of points contained in the
// first geometry but not the second geometry.
//
D2D1_COMBINE_MODE_EXCLUDE = 3,
D2D1_COMBINE_MODE_FORCE_DWORD = 0xffffffff
} D2D1_COMBINE_MODE;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_GEOMETRY_RELATION
//
//------------------------------------------------------------------------------
typedef enum D2D1_GEOMETRY_RELATION
{
//
// The relation between the geometries couldn't be determined. This value is never
// returned by any D2D method.
//
D2D1_GEOMETRY_RELATION_UNKNOWN = 0,
//
// The two geometries do not intersect at all.
//
D2D1_GEOMETRY_RELATION_DISJOINT = 1,
//
// The passed in geometry is entirely contained by the object.
//
D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2,
//
// The object entirely contains the passed in geometry.
//
D2D1_GEOMETRY_RELATION_CONTAINS = 3,
//
// The two geometries overlap but neither completely contains the other.
//
D2D1_GEOMETRY_RELATION_OVERLAP = 4,
D2D1_GEOMETRY_RELATION_FORCE_DWORD = 0xffffffff
} D2D1_GEOMETRY_RELATION;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_GEOMETRY_SIMPLIFICATION_OPTION
//
// Synopsis:
// Specifies how simple the output of a simplified geometry sink should be.
//
//------------------------------------------------------------------------------
typedef enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION
{
D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0,
D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1,
D2D1_GEOMETRY_SIMPLIFICATION_OPTION_FORCE_DWORD = 0xffffffff
} D2D1_GEOMETRY_SIMPLIFICATION_OPTION;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_FIGURE_BEGIN
//
// Synopsis:
// Indicates whether the given figure is filled or hollow.
//
//------------------------------------------------------------------------------
typedef enum D2D1_FIGURE_BEGIN
{
D2D1_FIGURE_BEGIN_FILLED = 0,
D2D1_FIGURE_BEGIN_HOLLOW = 1,
D2D1_FIGURE_BEGIN_FORCE_DWORD = 0xffffffff
} D2D1_FIGURE_BEGIN;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_FIGURE_END
//
// Synopsis:
// Indicates whether the figure ir open or closed on its end point.
//
//------------------------------------------------------------------------------
typedef enum D2D1_FIGURE_END
{
D2D1_FIGURE_END_OPEN = 0,
D2D1_FIGURE_END_CLOSED = 1,
D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff
} D2D1_FIGURE_END;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_BEZIER_SEGMENT
//
// Synopsis:
// Describes a cubic bezier in a path.
//
//------------------------------------------------------------------------------
typedef struct D2D1_BEZIER_SEGMENT
{
D2D1_POINT_2F point1;
D2D1_POINT_2F point2;
D2D1_POINT_2F point3;
} D2D1_BEZIER_SEGMENT;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_TRIANGLE
//
// Synopsis:
// Describes a triangle.
//
//------------------------------------------------------------------------------
typedef struct D2D1_TRIANGLE
{
D2D1_POINT_2F point1;
D2D1_POINT_2F point2;
D2D1_POINT_2F point3;
} D2D1_TRIANGLE;
//+-----------------------------------------------------------------------------
//
// Flag:
// D2D1_PATH_SEGMENT
//
// Synopsis:
// Indicates whether the given segment should be stroked, or, if the join between
// this segment and the previous one should be smooth.
//
//------------------------------------------------------------------------------
typedef enum D2D1_PATH_SEGMENT
{
D2D1_PATH_SEGMENT_NONE = 0x00000000,
D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 0x00000001,
D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 0x00000002,
D2D1_PATH_SEGMENT_FORCE_DWORD = 0xffffffff
} D2D1_PATH_SEGMENT;
DEFINE_ENUM_FLAG_OPERATORS(D2D1_PATH_SEGMENT);
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_SWEEP_DIRECTION
//
//------------------------------------------------------------------------------
typedef enum D2D1_SWEEP_DIRECTION
{
D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0,
D2D1_SWEEP_DIRECTION_CLOCKWISE = 1,
D2D1_SWEEP_DIRECTION_FORCE_DWORD = 0xffffffff
} D2D1_SWEEP_DIRECTION;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_FILL_MODE
//
//------------------------------------------------------------------------------
typedef enum D2D1_FILL_MODE
{
D2D1_FILL_MODE_ALTERNATE = 0,
D2D1_FILL_MODE_WINDING = 1,
D2D1_FILL_MODE_FORCE_DWORD = 0xffffffff
} D2D1_FILL_MODE;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_ARC_SEGMENT
//
// Synopsis:
// Describes an arc that is defined as part of a path.
//
//------------------------------------------------------------------------------
typedef struct D2D1_ARC_SEGMENT
{
D2D1_POINT_2F point;
D2D1_SIZE_F size;
FLOAT rotationAngle;
D2D1_SWEEP_DIRECTION sweepDirection;
D2D1_ARC_SIZE arcSize;
} D2D1_ARC_SEGMENT;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_QUADRATIC_BEZIER_SEGMENT
//
//------------------------------------------------------------------------------
typedef struct D2D1_QUADRATIC_BEZIER_SEGMENT
{
D2D1_POINT_2F point1;
D2D1_POINT_2F point2;
} D2D1_QUADRATIC_BEZIER_SEGMENT;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_ELLIPSE
//
//------------------------------------------------------------------------------
typedef struct D2D1_ELLIPSE
{
D2D1_POINT_2F point;
FLOAT radiusX;
FLOAT radiusY;
} D2D1_ELLIPSE;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_ROUNDED_RECT
//
//------------------------------------------------------------------------------
typedef struct D2D1_ROUNDED_RECT
{
D2D1_RECT_F rect;
FLOAT radiusX;
FLOAT radiusY;
} D2D1_ROUNDED_RECT;
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_STROKE_STYLE_PROPERTIES
//
// Synopsis:
// Properties, aside from the width, that allow geometric penning to be specified.
//
//------------------------------------------------------------------------------
typedef struct D2D1_STROKE_STYLE_PROPERTIES
{
D2D1_CAP_STYLE startCap;
D2D1_CAP_STYLE endCap;
D2D1_CAP_STYLE dashCap;
D2D1_LINE_JOIN lineJoin;
FLOAT miterLimit;
D2D1_DASH_STYLE dashStyle;
FLOAT dashOffset;
} D2D1_STROKE_STYLE_PROPERTIES;
//+-----------------------------------------------------------------------------
//
// Flag:
// D2D1_LAYER_OPTIONS
//
// Synopsis:
// Specified options that can be applied when a layer resource is applied to create
// a layer.
//
//------------------------------------------------------------------------------
typedef enum D2D1_LAYER_OPTIONS
{
D2D1_LAYER_OPTIONS_NONE = 0x00000000,
//
// The layer will render correctly for ClearType text. If the render target was set
// to ClearType previously, the layer will continue to render ClearType. If the
// render target was set to ClearType and this option is not specified, the render
// target will be set to render gray-scale until the layer is popped. The caller
// can override this default by calling SetTextAntialiasMode while within the
// layer. This flag is slightly slower than the default.
//
D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001,
D2D1_LAYER_OPTIONS_FORCE_DWORD = 0xffffffff
} D2D1_LAYER_OPTIONS;
DEFINE_ENUM_FLAG_OPERATORS(D2D1_LAYER_OPTIONS);
//+-----------------------------------------------------------------------------
//
// Struct:
// D2D1_LAYER_PARAMETERS
//
//------------------------------------------------------------------------------
typedef struct D2D1_LAYER_PARAMETERS
{
//
// The rectangular clip that will be applied to the layer. The clip is affected by
// the world transform. Content outside of the content bounds will not render.
//
D2D1_RECT_F contentBounds;
//
// A general mask that can be optionally applied to the content. Content not inside
// the fill of the mask will not be rendered.
//
__field_ecount_opt(1) ID2D1Geometry *geometricMask;
//
// Specifies whether the mask should be aliased or antialiased.
//
D2D1_ANTIALIAS_MODE maskAntialiasMode;
//
// An additional transform that may be applied to the mask in addition to the
// current world transform.
//
D2D1_MATRIX_3X2_F maskTransform;
//
// The opacity with which all of the content in the layer will be blended back to
// the target when the layer is popped.
//
FLOAT opacity;
//
// An additional brush that can be applied to the layer. Only the opacity channel
// is sampled from this brush and multiplied both with the layer content and the
// over-all layer opacity.
//
__field_ecount_opt(1) ID2D1Brush *opacityBrush;
//
// Specifies if ClearType will be rendered into the layer.
//
D2D1_LAYER_OPTIONS layerOptions;
} D2D1_LAYER_PARAMETERS;
//+-----------------------------------------------------------------------------
//
// Flag:
// D2D1_WINDOW_STATE
//
//------------------------------------------------------------------------------
typedef enum D2D1_WINDOW_STATE
{
D2D1_WINDOW_STATE_NONE = 0x0000000,
D2D1_WINDOW_STATE_OCCLUDED = 0x0000001,
D2D1_WINDOW_STATE_FORCE_DWORD = 0xffffffff
} D2D1_WINDOW_STATE;
DEFINE_ENUM_FLAG_OPERATORS(D2D1_WINDOW_STATE);
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_RENDER_TARGET_TYPE
//
//------------------------------------------------------------------------------
typedef enum D2D1_RENDER_TARGET_TYPE
{
//
// D2D is free to choose the render target type for the caller.
//
D2D1_RENDER_TARGET_TYPE_DEFAULT = 0,
//
// The render target will render using the CPU.
//
D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1,
//
// The render target will render using the GPU.
//
D2D1_RENDER_TARGET_TYPE_HARDWARE = 2,
D2D1_RENDER_TARGET_TYPE_FORCE_DWORD = 0xffffffff
} D2D1_RENDER_TARGET_TYPE;
//+-----------------------------------------------------------------------------
//
// Enum:
// D2D1_FEATURE_LEVEL
//
//------------------------------------------------------------------------------
typedef enum D2D1_FEATURE_LEVEL
{
//
// The caller does not require a particular underlying D3D device level.
//
D2D1_FEATURE_LEVEL_DEFAULT = 0,
//
// The D3D device level is DX9 compatible.
//
D2D1_FEATURE_LEVEL_9 = D3D10_FEATURE_LEVEL_9_1,
//
// The D3D device level is DX10 compatible.
//
D2D1_FEATURE_LEVEL_10 = D3D10_FEATURE_LEVEL_10_0,
D2D1_FEATURE_LEVEL_FORCE_DWORD = 0xffffffff