1 module aurora.directx.d2d1.d2d1_3;
2 
3 public import aurora.directx.d2d1.d2d1_2;
4 public import aurora.directx.dwrite.dwrite_3;
5 public import aurora.directx.d2d1.d2d1svg;
6 public import aurora.directx.d2d1.d2d1effects_2;
7 
8 public:
9 
10 ///
11 ///	Enumerations
12 ///
13 
14 enum D2D1_INK_NIB_SHAPE : int
15 {
16     ROUND = 0,
17     SQUARE = 1,
18     FORCE_DWORD = 0xffffffff
19 }
20 
21 enum D2D1_ORIENTATION : int
22 {
23     DEFAULT = 1,
24     FLIP_HORIZONTAL = 2,
25     ROTATE_CLOCKWISE180 = 3,
26     ROTATE_CLOCKWISE180_FLIP_HORIZONTAL = 4,
27     ROTATE_CLOCKWISE90_FLIP_HORIZONTAL = 5,
28     ROTATE_CLOCKWISE270 = 6,
29     ROTATE_CLOCKWISE270_FLIP_HORIZONTAL = 7,
30     ROTATE_CLOCKWISE90 = 8,
31     FORCE_DWORD = 0xffffffff
32 }
33 
34 enum D2D1_IMAGE_SOURCE_LOADING_OPTIONS : int
35 {
36     NONE = 0,
37     RELEASE_SOURCE = 1,
38     CACHE_ON_DEMAND = 2,
39     FORCE_DWORD = 0xffffffff
40 }
41 
42 enum D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS : int
43 {
44     NONE = 0,
45     DISABLE_DPI_SCALE = 1,
46     FORCE_DWORD = 0xffffffff
47 }
48 
49 enum D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS
50 {
51     NONE = 0,
52     LOW_QUALITY_PRIMARY_CONVERSION = 1,
53     FORCE_DWORD = 0xffffffff
54 }
55 
56 enum D2D1_PATCH_EDGE_MODE : int
57 {
58     ALIASED = 0,
59     ANTIALIASED = 1,
60     ALIASED_INFLATED = 2,
61     FORCE_DWORD = 0xffffffff
62 }
63 
64 enum D2D1_SPRITE_OPTIONS : int
65 {
66     NONE = 0,
67     CLAMP_TO_SOURCE_RECTANGLE = 1,
68     FORCE_DWORD = 0xffffffff
69 }
70 
71 enum D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION : int
72 {
73     DEFAULT = 0,
74     DISABLE = 1,
75     FORCE_DWORD = 0xffffffff
76 }
77 
78 enum D2D1_GAMMA1 : int
79 {
80     G22 = D2D1_GAMMA.GAMMA_2_2,
81     G10 = D2D1_GAMMA.GAMMA_1_0,
82     G2084 = 2,
83     FORCE_DWORD = 0xffffffff
84 }
85 
86 enum D2D1_COLOR_CONTEXT_TYPE : int
87 {
88     ICC = 0,
89     SIMPLE = 1,
90     DXGI = 2,
91     FORCE_DWORD = 0xffffffff
92 }
93 
94 ///
95 /// Structures
96 ///
97 
98 struct D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES
99 {
100     D2D1_ORIENTATION orientation;
101     float scaleX;
102     float scaleY;
103     D2D1_INTERPOLATION_MODE interpolationMode;
104     D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS options;
105 }
106 
107 struct D2D1_INK_POINT
108 {
109     float x;
110     float y;
111     float radius;
112 }
113 
114 struct D2D1_INK_BEZIER_SEGMENT
115 {
116     D2D1_INK_POINT point1;
117     D2D1_INK_POINT point2;
118     D2D1_INK_POINT point3;
119 }
120 
121 struct D2D1_INK_STYLE_PROPERTIES
122 {
123     D2D1_INK_NIB_SHAPE nibShape;
124     D2D1_MATRIX_3X2_F nibTransform;
125 }
126 
127 struct D2D1_GRADIENT_MESH_PATCH
128 {
129     D2D1_POINT_2F point00;
130     D2D1_POINT_2F point01;
131     D2D1_POINT_2F point02;
132     D2D1_POINT_2F point03;
133     D2D1_POINT_2F point10;
134     D2D1_POINT_2F point11;
135     D2D1_POINT_2F point12;
136     D2D1_POINT_2F point13;
137     D2D1_POINT_2F point20;
138     D2D1_POINT_2F point21;
139     D2D1_POINT_2F point22;
140     D2D1_POINT_2F point23;
141     D2D1_POINT_2F point30;
142     D2D1_POINT_2F point31;
143     D2D1_POINT_2F point32;
144     D2D1_POINT_2F point33;
145     D2D1_COLOR_F color00;
146     D2D1_COLOR_F color03;
147     D2D1_COLOR_F color30;
148     D2D1_COLOR_F color33;
149     D2D1_PATCH_EDGE_MODE topEdgeMode;
150     D2D1_PATCH_EDGE_MODE leftEdgeMode;
151     D2D1_PATCH_EDGE_MODE bottomEdgeMode;
152     D2D1_PATCH_EDGE_MODE rightEdgeMode;
153 }
154 
155 struct D2D1_SIMPLE_COLOR_PROFILE
156 {
157     D2D1_POINT_2F redPrimary;
158     D2D1_POINT_2F greenPrimary;
159     D2D1_POINT_2F bluePrimary;
160     D2D1_POINT_2F whitePointXZ;
161     D2D1_GAMMA1 gamma;
162 }
163 
164 ///
165 /// Interfaces
166 ///
167 
168 mixin(uuid!(ID2D1InkStyle, "bae8b344-23fc-4071-8cb5-d05d6f073848"));
169 public interface ID2D1InkStyle : ID2D1Resource
170 {
171 extern(Windows):
172 	D2D1_INK_NIB_SHAPE GetNibShape();
173     void GetNibTransform(D2D1_MATRIX_3X2_F *transform);
174     void SetNibShape(D2D1_INK_NIB_SHAPE nibShape);
175     void SetNibTransform(const D2D1_MATRIX_3X2_F *transform);
176     final void SetNibTransform(const D2D1_MATRIX_3X2_F transform) {
177         SetNibTransform(&transform);
178     }
179 }
180 
181 mixin(uuid!(ID2D1Ink, "b499923b-7029-478f-a8b3-432c7c5f5312"));
182 public interface ID2D1Ink : ID2D1Resource
183 {
184 extern(Windows):
185 	HRESULT AddSegments(const D2D1_INK_BEZIER_SEGMENT *segments, uint segmentsCount);
186     HRESULT GetBounds(ID2D1InkStyle inkStyle, const D2D1_MATRIX_3X2_F *worldTransform, D2D1_RECT_F *bounds);
187     uint GetSegmentCount();
188     HRESULT GetSegments(uint startSegment, D2D1_INK_BEZIER_SEGMENT *segments, uint segmentsCount);
189     D2D1_INK_POINT GetStartPoint();
190     HRESULT RemoveSegmentsAtEnd(uint segmentsCount);
191     HRESULT SetSegmentAtEnd(const D2D1_INK_BEZIER_SEGMENT *segment);
192     HRESULT SetSegments(uint startSegment, const D2D1_INK_BEZIER_SEGMENT *segments, uint segmentsCount);
193     void SetStartPoint(const D2D1_INK_POINT *startPoint);
194     HRESULT StreamAsGeometry(ID2D1InkStyle inkStyle, const D2D1_MATRIX_3X2_F *worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink geometrySink);
195 
196     final void SetStartPoint(const D2D1_INK_POINT startPoint) {
197         SetStartPoint(&startPoint);
198     }
199     
200     final HRESULT SetSegmentAtEnd(const D2D1_INK_BEZIER_SEGMENT segment) {
201         return SetSegmentAtEnd(&segment);
202     }
203     
204     final HRESULT StreamAsGeometry(ID2D1InkStyle inkStyle, const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink geometrySink ) {
205         return StreamAsGeometry(inkStyle, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
206     }
207     
208     final HRESULT StreamAsGeometry(ID2D1InkStyle inkStyle, const D2D1_MATRIX_3X2_F worldTransform, ID2D1SimplifiedGeometrySink geometrySink) {
209         return StreamAsGeometry(inkStyle, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
210     }
211 
212     final HRESULT StreamAsGeometry(ID2D1InkStyle inkStyle, const D2D1_MATRIX_3X2_F worldTransform, float flatteningTolerance, ID2D1SimplifiedGeometrySink geometrySink) {
213         return StreamAsGeometry(inkStyle, &worldTransform, flatteningTolerance, geometrySink);
214     }
215 }
216 
217 mixin(uuid!(ID2D1GradientMesh, "f292e401-c050-4cde-83d7-04962d3b23c2"));
218 public interface ID2D1GradientMesh : ID2D1Resource
219 {
220 extern(Windows):
221 	uint GetPatchCount();
222     HRESULT GetPatches(uint startIndex, D2D1_GRADIENT_MESH_PATCH *patches, uint patchesCount);
223 }
224 
225 mixin(uuid!(ID2D1ImageSource, "c9b664e5-74a1-4378-9ac2-eefc37a3f4d8"));
226 public interface ID2D1ImageSource : ID2D1Image
227 {
228 extern(Windows):
229 	HRESULT OfferResources();
230     HRESULT TryReclaimResources(bool *resourcesDiscarded);
231 }
232 
233 mixin(uuid!(ID2D1ImageSourceFromWic, "77395441-1c8f-4555-8683-f50dab0fe792"));
234 public interface ID2D1ImageSourceFromWic : ID2D1ImageSource
235 {
236 extern(Windows):
237 	HRESULT EnsureCached(const D2D1_RECT_U *rectangleToFill);
238     final HRESULT EnsureCached(const D2D1_RECT_U rectangleToFill) {
239         return EnsureCached(&rectangleToFill);
240     }
241     void GetSource(IWICBitmapSource wicBitmapSource);
242     HRESULT TrimCache(const D2D1_RECT_U *rectangleToPreserve);
243     final HRESULT TrimCache(const D2D1_RECT_U rectangleToPreserve) {
244         return TrimCache(&rectangleToPreserve);
245     }
246 }
247 
248 mixin(uuid!(ID2D1TransformedImageSource, "7f1f79e5-2796-416c-8f55-700f911445e5"));
249 public interface ID2D1TransformedImageSource : ID2D1Image
250 {
251 extern(Windows):
252 	void GetProperties(D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *properties);
253     void GetSource(ID2D1ImageSource *imageSource);
254 }
255 
256 mixin(uuid!(ID2D1LookupTable3D, "53dd9855-a3b0-4d5b-82e1-26e25c5e5797"));
257 public interface ID2D1LookupTable3D : ID2D1Resource
258 {
259 extern(Windows):
260 }
261 
262 mixin(uuid!(ID2D1DeviceContext2, "394ea6a3-0c34-4321-950b-6ca20f0be6c7"));
263 public interface ID2D1DeviceContext2 : ID2D1DeviceContext1
264 {
265 extern(Windows):
266     HRESULT CreateGradientMesh(const D2D1_GRADIENT_MESH_PATCH *patches, uint patchesCount, ID2D1GradientMesh *gradientMesh);
267     HRESULT CreateImageSourceFromDxgi(IDXGISurface *surfaces, const D2D1_RECT_U *sourceRectangles, uint surfaceCount, DXGI_COLOR_SPACE_TYPE colorSpace, D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS options, ID2D1ImageSource *imageSource);
268     HRESULT CreateLookupTable3D(D2D1_BUFFER_PRECISION precision, const uint *extents, const byte *data, uint dataCount, const uint *strides, ID2D1LookupTable3D *lookupTable);
269     HRESULT CreateTransformedImageSource(ID2D1ImageSource imageSource, const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *properties, ID2D1TransformedImageSource *transformedImageSource);
270 
271     HRESULT CreateInk(const D2D1_INK_POINT *startPoint, ID2D1Ink *ink);
272     final HRESULT CreateInk(const D2D1_INK_POINT startPoint, ID2D1Ink *ink) {
273         return CreateInk(&startPoint, ink);
274     }
275     HRESULT CreateInkStyle(const D2D1_INK_STYLE_PROPERTIES *inkStyleProperties, ID2D1InkStyle *inkStyle);
276     final HRESULT CreateInkStyle(const D2D1_INK_STYLE_PROPERTIES inkStyleProperties, ID2D1InkStyle *inkStyle) {
277         return CreateInkStyle(&inkStyleProperties, inkStyle);
278     }
279     HRESULT CreateImageSourceFromWic(IWICBitmapSource wicBitmapSource, D2D1_IMAGE_SOURCE_LOADING_OPTIONS loadingOptions, D2D1_ALPHA_MODE alphaMode, ID2D1ImageSourceFromWic *imageSource);
280     final HRESULT CreateImageSourceFromWic(IWICBitmapSource wicBitmapSource, D2D1_IMAGE_SOURCE_LOADING_OPTIONS loadingOptions, ID2D1ImageSourceFromWic *imageSource) {
281         return CreateImageSourceFromWic(wicBitmapSource, loadingOptions, D2D1_ALPHA_MODE.UNKNOWN, imageSource);
282     }    
283     final HRESULT CreateImageSourceFromWic(IWICBitmapSource wicBitmapSource, ID2D1ImageSourceFromWic *imageSource) {
284         return CreateImageSourceFromWic(wicBitmapSource, D2D1_IMAGE_SOURCE_LOADING_OPTIONS.NONE, D2D1_ALPHA_MODE.UNKNOWN, imageSource);
285     }    
286     void DrawGdiMetafile(ID2D1GdiMetafile gdiMetafile, const D2D1_RECT_F *destinationRectangle, const D2D1_RECT_F *sourceRectangle = NULL);
287     final void DrawGdiMetafile(ID2D1GdiMetafile gdiMetafile, const D2D1_RECT_F destinationRectangle, const D2D1_RECT_F sourceRectangle) {
288         return DrawGdiMetafile(gdiMetafile, &destinationRectangle, &sourceRectangle);
289     }
290     final void DrawGdiMetafile(ID2D1GdiMetafile gdiMetafile, const D2D1_RECT_F destinationRectangle, const D2D1_RECT_F *sourceRectangle = null) {
291         return DrawGdiMetafile(gdiMetafile, &destinationRectangle, sourceRectangle);
292     }
293     void DrawGradientMesh(ID2D1GradientMesh gradientMesh);
294     void DrawInk(ID2D1Ink ink, ID2D1Brush brush, ID2D1InkStyle inkStyle);
295     HRESULT GetGradientMeshWorldBounds(ID2D1GradientMesh gradientMesh, D2D1_RECT_F *pBounds);
296 }
297 
298 mixin(uuid!(ID2D1Device2, "a44472e1-8dfb-4e60-8492-6e2861c9ca8b"));
299 public interface ID2D1Device2 : ID2D1Device1
300 {
301 extern(Windows):
302     HRESULT CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext2 *deviceContext2);
303     void FlushDeviceContexts(ID2D1Bitmap bitmap);
304     HRESULT GetDxgiDevice(IDXGIDevice *dxgiDevice);
305 }
306 
307 mixin(uuid!(ID2D1Factory3, "0869759f-4f00-413f-b03e-2bda45404d0f"));
308 public interface ID2D1Factory3 : ID2D1Factory2
309 {
310 extern(Windows):
311     HRESULT CreateDevice(IDXGIDevice dxgiDevice, ID2D1Device2 *d2dDevice2);
312 }
313 
314 mixin(uuid!(ID2D1CommandSink2, "3bab440e-417e-47df-a2e2-bc0be6a00916"));
315 public interface ID2D1CommandSink2 : ID2D1CommandSink1
316 {
317 extern(Windows):
318     void DrawGdiMetafile(ID2D1GdiMetafile gdiMetafile, const D2D1_RECT_F *destinationRectangle, const D2D1_RECT_F *sourceRectangle);
319     void DrawGradientMesh(ID2D1GradientMesh gradientMesh);
320     void DrawInk(ID2D1Ink ink, ID2D1Brush brush, ID2D1InkStyle inkStyle);
321 }
322 
323 mixin(uuid!(ID2D1GdiMetafile1, "2e69f9e8-dd3f-4bf9-95ba-c04f49d788df"));
324 public interface ID2D1GdiMetafile1 : ID2D1GdiMetafile
325 {
326 extern(Windows):
327     HRESULT GetDpi(float *dpiX, float *dpiY);
328     HRESULT GetSourceBounds(out D2D1_RECT_F *bounds);
329 }
330 
331 mixin(uuid!(ID2D1GdiMetafileSink1, "fd0ecb6b-91e6-411e-8655-395e760f91b4"));
332 public interface ID2D1GdiMetafileSink1 : ID2D1GdiMetafileSink
333 {
334 extern(Windows):
335     HRESULT ProcessRecord( DWORD recordType, const void *recordData, uint recordDataSize, uint flags);
336 }
337 
338 mixin(uuid!(ID2D1SpriteBatch, "4dc583bf-3a10-438a-8722-e9765224f1f1"));
339 public interface ID2D1SpriteBatch : ID2D1Resource
340 {
341 extern(Windows):
342     HRESULT AddSprites(uint spriteCount, const D2D1_RECT_F *destinationRectangles, const D2D1_RECT_U *sourceRectangles = null, const D2D1_COLOR_F *colors = null, const D2D1_MATRIX_3X2_F *transforms = null, uint destinationRectanglesStride = D2D1_RECT_F.sizeof, uint sourceRectangleStride = D2D1_RECT_U.sizeof, uint colorStride = D2D1_COLOR_F.sizeof, uint transformStride = D2D1_MATRIX_3X2_F.sizeof);
343     void Clear();
344     uint GetSpriteCount();
345     HRESULT GetSprites(uint startIndex, uint spriteCount, D2D1_RECT_F *destinationRectangles = NULL, D2D1_RECT_U *sourceRectangles = null, D2D1_COLOR_F *colors = null, D2D1_MATRIX_3X2_F *transforms = null);
346     HRESULT SetSprites(uint startIndex, uint spriteCount, const D2D1_RECT_F *destinationRectangles = NULL, const D2D1_RECT_U *sourceRectangles = null, const D2D1_COLOR_F *colors = null, const D2D1_MATRIX_3X2_F *transforms = null, uint destinationRectanglesStride = D2D1_RECT_F.sizeof, uint sourceRectangleStride = D2D1_RECT_U.sizeof, uint colorStride = D2D1_COLOR_F.sizeof, uint transformStride = D2D1_MATRIX_3X2_F.sizeof);
347 }
348 
349 mixin(uuid!(ID2D1DeviceContext3, "235a7496-8351-414c-bcd4-6672ab2d8e00"));
350 public interface ID2D1DeviceContext3 : ID2D1DeviceContext2
351 {
352 extern(Windows):
353     HRESULT CreateSpriteBatch(ID2D1SpriteBatch *spriteBatch);
354     void DrawSpriteBatch(ID2D1SpriteBatch spriteBatch, uint startIndex, uint spriteCount, ID2D1Bitmap bitmap, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE.LINEAR, D2D1_SPRITE_OPTIONS spriteOptions = D2D1_SPRITE_OPTIONS.NONE);
355     final void DrawSpriteBatch(ID2D1SpriteBatch spriteBatch, ID2D1Bitmap bitmap, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE.LINEAR, D2D1_SPRITE_OPTIONS spriteOptions = D2D1_SPRITE_OPTIONS.NONE) {
356         return DrawSpriteBatch(spriteBatch, 0, spriteBatch.GetSpriteCount(), bitmap, interpolationMode, spriteOptions);
357     }
358 }
359 
360 mixin(uuid!(ID2D1Device3, "852f2087-802c-4037-ab60-ff2e7ee6fc01"));
361 public interface ID2D1Device3 : ID2D1Device2
362 {
363 extern(Windows):
364     HRESULT CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext3 *deviceContext3);
365 }
366 
367 mixin(uuid!(ID2D1Factory4, "bd4ec2d2-0662-4bee-ba8e-6f29f032e096"));
368 public interface ID2D1Factory4 : ID2D1Factory3
369 {
370 extern(Windows):
371     HRESULT CreateDevice(IDXGIDevice  dxgiDevice, ID2D1Device3 *d2dDevice3);
372 }
373 
374 mixin(uuid!(ID2D1CommandSink3, "18079135-4cf3-4868-bc8e-06067e6d242d"));
375 public interface ID2D1CommandSink3 : ID2D1CommandSink2
376 {
377 extern(Windows):
378     HRESULT DrawSpriteBatch(ID2D1SpriteBatch spriteBatch, uint startIndex, uint spriteCount, ID2D1Bitmap bitmap, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode, D2D1_SPRITE_OPTIONS spriteOptions);
379 }
380 
381 mixin(uuid!(ID2D1SvgGlyphStyle, "af671749-d241-4db8-8e41-dcc2e5c1a438"));
382 public interface ID2D1SvgGlyphStyle : ID2D1Resource
383 {
384 extern(Windows):
385     void GetFill(ID2D1Brush *brush);
386     void GetStroke(ID2D1Brush *brush, float*strokeWidth = NULL, float *dashes = NULL, uint dashesCount = 0, float *dashOffset = null);
387     uint GetStrokeDashesCount();
388     HRESULT SetFill(ID2D1Brush brush);
389     HRESULT SetStroke(ID2D1Brush brush, float strokeWidth = 1.0f, const float *dashes = NULL, uint dashesCount = 0, float dashOffset = 1.0f);
390 }
391 
392 mixin(uuid!(ID2D1DeviceContext4, "8c427831-3d90-4476-b647-c4fae349e4db"));
393 public interface ID2D1DeviceContext4 : ID2D1DeviceContext3
394 {
395 extern(Windows):
396     HRESULT CreateSvgGlyphStyle(ID2D1SvgGlyphStyle *svgGlyphStyle);
397     void DrawColorBitmapGlyphRun(DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat, D2D1_POINT_2F baselineOrigin, const DWRITE_GLYPH_RUN *glyphRun, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE.NATURAL, D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION bitmapSnapOption = D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION.DEFAULT);
398     void DrawSvgGlyphRun(D2D1_POINT_2F baselineOrigin, const DWRITE_GLYPH_RUN *glyphRun, ID2D1Brush defaultFillBrush = null, ID2D1SvgGlyphStyle svgGlyphStyle = null, uint colorPaletteIndex = 0, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE.NATURAL);
399     void DrawText(const WCHAR *string, uint stringLength, IDWriteTextFormat textFormat, const D2D1_RECT_F *layoutRect, ID2D1Brush defaultFillBrush, ID2D1SvgGlyphStyle svgGlyphStyle, uint colorPaletteIndex = 0, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS.ENABLE_COLOR_FONT, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE.NATURAL);
400     final void DrawText(const WCHAR *string, uint stringLength, IDWriteTextFormat textFormat, const D2D1_RECT_F layoutRect, ID2D1Brush defaultFillBrush, ID2D1SvgGlyphStyle svgGlyphStyle, uint colorPaletteIndex = 0, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS.ENABLE_COLOR_FONT, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE.NATURAL) {
401         return DrawText(string, stringLength, textFormat, &layoutRect, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, options, measuringMode);
402     }
403     void DrawTextLayout(D2D1_POINT_2F origin, IDWriteTextLayout textLayout, ID2D1Brush defaultFillBrush, ID2D1SvgGlyphStyle svgGlyphStyle, uint colorPaletteIndex = 0, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS.ENABLE_COLOR_FONT);
404     HRESULT GetColorBitmapGlyphImage(DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat, D2D1_POINT_2F glyphOrigin, IDWriteFontFace fontFace, float fontEmSize, ushort glyphIndex, bool isSideways, const D2D1_MATRIX_3X2_F *worldTransform, float dpiX, float dpiY, D2D1_MATRIX_3X2_F *glyphTransform, ID2D1Image *glyphImage);
405     HRESULT GetSvgGlyphImage(D2D1_POINT_2F glyphOrigin, IDWriteFontFace fontFace, float fontEmSize, ushort glyphIndex, bool isSideways, const D2D1_MATRIX_3X2_F *worldTransform, ID2D1Brush defaultFillBrush, ID2D1SvgGlyphStyle svgGlyphStyle, uint colorPaletteIndex, D2D1_MATRIX_3X2_F *glyphTransform, ID2D1CommandList *glyphImage);
406 }
407 
408 mixin(uuid!(ID2D1Device4, "d7bdb159-5683-4a46-bc9c-72dc720b858b"));
409 public interface ID2D1Device4 : ID2D1Device3
410 {
411 extern(Windows):
412     HRESULT CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext4 *deviceContext4);
413     ulong GetMaximumColorGlyphCacheMemory();
414     void SetMaximumColorGlyphCacheMemory(ulong maximumInBytes);
415 }
416 
417 mixin(uuid!(ID2D1Factory5, "c4349994-838e-4b0f-8cab-44997d9eeacc"));
418 public interface ID2D1Factory5 : ID2D1Factory4
419 {
420 extern(Windows):
421     HRESULT CreateDevice(IDXGIDevice dxgiDevice, ID2D1Device4 *d2dDevice4);
422 }
423 
424 mixin(uuid!(ID2D1CommandSink4, "c78a6519-40d6-4218-b2de-beeeb744bb3e"));
425 public interface ID2D1CommandSink4 : ID2D1CommandSink3
426 {
427 extern(Windows):
428     HRESULT SetPrimitiveBlend2(D2D1_PRIMITIVE_BLEND primitiveBlend);
429 }
430 
431 mixin(uuid!(ID2D1ColorContext1, "1ab42875-c57f-4be9-bd85-9cd78d6f55ee"));
432 public interface ID2D1ColorContext1 : ID2D1ColorContext
433 {
434 extern(Windows):
435     D2D1_COLOR_CONTEXT_TYPE GetColorContextType();
436     DXGI_COLOR_SPACE_TYPE GetDXGIColorSpace();
437     HRESULT GetSimpleColorProfile(D2D1_SIMPLE_COLOR_PROFILE *simpleProfile);
438 }
439 
440 mixin(uuid!(ID2D1DeviceContext5, "7836d248-68cc-4df6-b9e8-de991bf62eb7"));
441 public interface ID2D1DeviceContext5 : ID2D1DeviceContext4
442 {
443 extern(Windows):
444     HRESULT CreateColorContextFromDxgiColorSpace(DXGI_COLOR_SPACE_TYPE colorSpace, ID2D1ColorContext1 *colorContext);
445     HRESULT CreateColorContextFromSimpleColorProfile(const D2D1_SIMPLE_COLOR_PROFILE *simpleProfile, ID2D1ColorContext1 *colorContext);
446     final HRESULT CreateColorContextFromSimpleColorProfile(const D2D1_SIMPLE_COLOR_PROFILE simpleProfile, ID2D1ColorContext1 *colorContext) {
447         return CreateColorContextFromSimpleColorProfile(&simpleProfile, colorContext);
448     }
449     HRESULT CreateSvgDocument(IStream inputXmlStream, D2D1_SIZE_F viewportSize, ID2D1SvgDocument *svgDocument);
450     void DrawSvgDocument(ID2D1SvgDocument svgDocument);
451 }
452 
453 mixin(uuid!(ID2D1Device5, "d55ba0a4-6405-4694-aef5-08ee1a4358b4"));
454 public interface ID2D1Device5 : ID2D1Device4
455 {
456 extern(Windows):
457     HRESULT CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext5 *deviceContext5);
458 }
459 
460 mixin(uuid!(ID2D1Factory6, "f9976f46-f642-44c1-97ca-da32ea2a2635"));
461 public interface ID2D1Factory6 : ID2D1Factory5
462 {
463 extern(Windows):
464     HRESULT CreateDevice(IDXGIDevice dxgiDevice, ID2D1Device5 *d2dDevice5);
465 }
466 
467 mixin(uuid!(ID2D1CommandSink5, "7047dd26-b1e7-44a7-959a-8349e2144fa8"));
468 public interface ID2D1CommandSink5 : ID2D1CommandSink4
469 {
470 extern(Windows):
471     HRESULT BlendImage(ID2D1Image image, D2D1_BLEND_MODE blendMode, const D2D1_POINT_2F *targetOffset, const D2D1_RECT_F *imageRectangle, D2D1_INTERPOLATION_MODE interpolationMode);
472 }
473 
474 mixin(uuid!(ID2D1DeviceContext6, "985f7e37-4ed0-4a19-98a3-15b0edfde306"));
475 public interface ID2D1DeviceContext6 : ID2D1DeviceContext5
476 {
477 extern(Windows):
478     void BlendImage(ID2D1Image image, D2D1_BLEND_MODE blendMode, const D2D1_POINT_2F *targetOffset = null, const D2D1_RECT_F *imageRectangle = null, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE.LINEAR);
479 }
480 
481 mixin(uuid!(ID2D1Device6, "7bfef914-2d75-4bad-be87-e18ddb077b6d"));
482 public interface ID2D1Device6 : ID2D1Device5
483 {
484 extern(Windows):
485     HRESULT CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext5 *deviceContext5);
486 }
487 
488 mixin(uuid!(ID2D1Factory7, "bdc2bdd3-b96c-4de6-bdf7-99d4745454de"));
489 public interface ID2D1Factory7 : ID2D1Factory6
490 {
491 extern(Windows):
492     HRESULT CreateDevice(IDXGIDevice dxgiDevice,ID2D1Device6 *d2dDevice6);
493 }
494 
495 ///
496 /// Functions
497 ///
498 
499 extern(Windows) {
500     void D2D1GetGradientMeshInteriorPointsFromCoonsPatch(const D2D1_POINT_2F *pPoint0, const D2D1_POINT_2F *pPoint1, const D2D1_POINT_2F *pPoint2, const D2D1_POINT_2F *pPoint3, const D2D1_POINT_2F *pPoint4, const D2D1_POINT_2F *pPoint5, const D2D1_POINT_2F *pPoint6, const D2D1_POINT_2F *pPoint7, const D2D1_POINT_2F *pPoint8, const D2D1_POINT_2F *pPoint9, const D2D1_POINT_2F *pPoint10, const D2D1_POINT_2F *pPoint11, D2D1_POINT_2F *pTensorPoint11, D2D1_POINT_2F *pTensorPoint12, D2D1_POINT_2F *pTensorPoint21, D2D1_POINT_2F *pTensorPoint22);
501 }