1 ##########################################################################
3 # Copyright 2011 Jose Fonseca
6 # Permission is hereby granted, free of charge, to any person obtaining a copy
7 # of this software and associated documentation files (the "Software"), to deal
8 # in the Software without restriction, including without limitation the rights
9 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 # copies of the Software, and to permit persons to whom the Software is
11 # furnished to do so, subject to the following conditions:
13 # The above copyright notice and this permission notice shall be included in
14 # all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 ##########################################################################/
28 from dxgiformat import DXGI_FORMAT
29 from dxgi import IDXGISurface
31 from d2dbasetypes import *
35 ID2D1Resource = Interface("ID2D1Resource", IUnknown)
36 ID2D1Bitmap = Interface("ID2D1Bitmap", ID2D1Resource)
37 ID2D1GradientStopCollection = Interface("ID2D1GradientStopCollection", ID2D1Resource)
38 ID2D1Brush = Interface("ID2D1Brush", ID2D1Resource)
39 ID2D1BitmapBrush = Interface("ID2D1BitmapBrush", ID2D1Brush)
40 ID2D1SolidColorBrush = Interface("ID2D1SolidColorBrush", ID2D1Brush)
41 ID2D1LinearGradientBrush = Interface("ID2D1LinearGradientBrush", ID2D1Brush)
42 ID2D1RadialGradientBrush = Interface("ID2D1RadialGradientBrush", ID2D1Brush)
43 ID2D1StrokeStyle = Interface("ID2D1StrokeStyle", ID2D1Resource)
44 ID2D1Geometry = Interface("ID2D1Geometry", ID2D1Resource)
45 ID2D1RectangleGeometry = Interface("ID2D1RectangleGeometry", ID2D1Geometry)
46 ID2D1RoundedRectangleGeometry = Interface("ID2D1RoundedRectangleGeometry", ID2D1Geometry)
47 ID2D1EllipseGeometry = Interface("ID2D1EllipseGeometry", ID2D1Geometry)
48 ID2D1GeometryGroup = Interface("ID2D1GeometryGroup", ID2D1Geometry)
49 ID2D1TransformedGeometry = Interface("ID2D1TransformedGeometry", ID2D1Geometry)
50 ID2D1GeometrySink = Interface("ID2D1GeometrySink", ID2D1SimplifiedGeometrySink)
51 ID2D1TessellationSink = Interface("ID2D1TessellationSink", IUnknown)
52 ID2D1PathGeometry = Interface("ID2D1PathGeometry", ID2D1Geometry)
53 ID2D1Mesh = Interface("ID2D1Mesh", ID2D1Resource)
54 ID2D1Layer = Interface("ID2D1Layer", ID2D1Resource)
55 ID2D1DrawingStateBlock = Interface("ID2D1DrawingStateBlock", ID2D1Resource)
56 ID2D1RenderTarget = Interface("ID2D1RenderTarget", ID2D1Resource)
57 ID2D1BitmapRenderTarget = Interface("ID2D1BitmapRenderTarget", ID2D1RenderTarget)
58 ID2D1HwndRenderTarget = Interface("ID2D1HwndRenderTarget", ID2D1RenderTarget)
59 ID2D1GdiInteropRenderTarget = Interface("ID2D1GdiInteropRenderTarget", IUnknown)
60 ID2D1DCRenderTarget = Interface("ID2D1DCRenderTarget", ID2D1RenderTarget)
61 ID2D1Factory = Interface("ID2D1Factory", IUnknown)
64 D2D1_ALPHA_MODE = Enum("D2D1_ALPHA_MODE", [
65 "D2D1_ALPHA_MODE_UNKNOWN",
66 "D2D1_ALPHA_MODE_PREMULTIPLIED",
67 "D2D1_ALPHA_MODE_STRAIGHT",
68 "D2D1_ALPHA_MODE_IGNORE",
71 D2D1_GAMMA = Enum("D2D1_GAMMA", [
76 D2D1_OPACITY_MASK_CONTENT = Enum("D2D1_OPACITY_MASK_CONTENT", [
77 "D2D1_OPACITY_MASK_CONTENT_GRAPHICS",
78 "D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL",
79 "D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE",
82 D2D1_EXTEND_MODE = Enum("D2D1_EXTEND_MODE", [
83 "D2D1_EXTEND_MODE_CLAMP",
84 "D2D1_EXTEND_MODE_WRAP",
85 "D2D1_EXTEND_MODE_MIRROR",
88 D2D1_ANTIALIAS_MODE = Enum("D2D1_ANTIALIAS_MODE", [
89 "D2D1_ANTIALIAS_MODE_PER_PRIMITIVE",
90 "D2D1_ANTIALIAS_MODE_ALIASED",
93 D2D1_TEXT_ANTIALIAS_MODE = Enum("D2D1_TEXT_ANTIALIAS_MODE", [
94 "D2D1_TEXT_ANTIALIAS_MODE_DEFAULT",
95 "D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE",
96 "D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE",
97 "D2D1_TEXT_ANTIALIAS_MODE_ALIASED",
100 D2D1_BITMAP_INTERPOLATION_MODE = Enum("D2D1_BITMAP_INTERPOLATION_MODE", [
101 "D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR",
102 "D2D1_BITMAP_INTERPOLATION_MODE_LINEAR",
105 D2D1_DRAW_TEXT_OPTIONS = EnumFlag("D2D1_DRAW_TEXT_OPTIONS", [
106 "D2D1_DRAW_TEXT_OPTIONS_NONE",
107 "D2D1_DRAW_TEXT_OPTIONS_NO_SNAP",
108 "D2D1_DRAW_TEXT_OPTIONS_CLIP",
111 D2D1_PIXEL_FORMAT = Struct("D2D1_PIXEL_FORMAT", [
112 (DXGI_FORMAT, "format"),
113 (D2D1_ALPHA_MODE, "alphaMode"),
116 D2D1_POINT_2U = Alias("D2D1_POINT_2U", D2D_POINT_2U)
117 D2D1_POINT_2F = Alias("D2D1_POINT_2F", D2D_POINT_2F)
118 D2D1_RECT_F = Alias("D2D1_RECT_F", D2D_RECT_F)
119 D2D1_RECT_U = Alias("D2D1_RECT_U", D2D_RECT_U)
120 D2D1_SIZE_F = Alias("D2D1_SIZE_F", D2D_SIZE_F)
121 D2D1_SIZE_U = Alias("D2D1_SIZE_U", D2D_SIZE_U)
122 D2D1_COLOR_F = Alias("D2D1_COLOR_F", D2D_COLOR_F)
123 D2D1_MATRIX_3X2_F = Alias("D2D1_MATRIX_3X2_F", D2D_MATRIX_3X2_F)
124 D2D1_TAG = Alias("D2D1_TAG", UINT64)
125 D2D1_BITMAP_PROPERTIES = Struct("D2D1_BITMAP_PROPERTIES", [
126 (D2D1_PIXEL_FORMAT, "pixelFormat"),
131 D2D1_GRADIENT_STOP = Struct("D2D1_GRADIENT_STOP", [
133 (D2D1_COLOR_F, "color"),
136 D2D1_BRUSH_PROPERTIES = Struct("D2D1_BRUSH_PROPERTIES", [
138 (D2D1_MATRIX_3X2_F, "transform"),
141 D2D1_BITMAP_BRUSH_PROPERTIES = Struct("D2D1_BITMAP_BRUSH_PROPERTIES", [
142 (D2D1_EXTEND_MODE, "extendModeX"),
143 (D2D1_EXTEND_MODE, "extendModeY"),
144 (D2D1_BITMAP_INTERPOLATION_MODE, "interpolationMode"),
147 D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES = Struct("D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES", [
148 (D2D1_POINT_2F, "startPoint"),
149 (D2D1_POINT_2F, "endPoint"),
152 D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES = Struct("D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES", [
153 (D2D1_POINT_2F, "center"),
154 (D2D1_POINT_2F, "gradientOriginOffset"),
159 D2D1_ARC_SIZE = Enum("D2D1_ARC_SIZE", [
160 "D2D1_ARC_SIZE_SMALL",
161 "D2D1_ARC_SIZE_LARGE",
164 D2D1_CAP_STYLE = Enum("D2D1_CAP_STYLE", [
165 "D2D1_CAP_STYLE_FLAT",
166 "D2D1_CAP_STYLE_SQUARE",
167 "D2D1_CAP_STYLE_ROUND",
168 "D2D1_CAP_STYLE_TRIANGLE",
171 D2D1_DASH_STYLE = Enum("D2D1_DASH_STYLE", [
172 "D2D1_DASH_STYLE_SOLID",
173 "D2D1_DASH_STYLE_DASH",
174 "D2D1_DASH_STYLE_DOT",
175 "D2D1_DASH_STYLE_DASH_DOT",
176 "D2D1_DASH_STYLE_DASH_DOT_DOT",
177 "D2D1_DASH_STYLE_CUSTOM",
180 D2D1_LINE_JOIN = Enum("D2D1_LINE_JOIN", [
181 "D2D1_LINE_JOIN_MITER",
182 "D2D1_LINE_JOIN_BEVEL",
183 "D2D1_LINE_JOIN_ROUND",
184 "D2D1_LINE_JOIN_MITER_OR_BEVEL",
187 D2D1_COMBINE_MODE = Enum("D2D1_COMBINE_MODE", [
188 "D2D1_COMBINE_MODE_UNION",
189 "D2D1_COMBINE_MODE_INTERSECT",
190 "D2D1_COMBINE_MODE_XOR",
191 "D2D1_COMBINE_MODE_EXCLUDE",
194 D2D1_GEOMETRY_RELATION = Enum("D2D1_GEOMETRY_RELATION", [
195 "D2D1_GEOMETRY_RELATION_UNKNOWN",
196 "D2D1_GEOMETRY_RELATION_DISJOINT",
197 "D2D1_GEOMETRY_RELATION_IS_CONTAINED",
198 "D2D1_GEOMETRY_RELATION_CONTAINS",
199 "D2D1_GEOMETRY_RELATION_OVERLAP",
202 D2D1_GEOMETRY_SIMPLIFICATION_OPTION = Enum("D2D1_GEOMETRY_SIMPLIFICATION_OPTION", [
203 "D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES",
204 "D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES",
207 D2D1_FIGURE_BEGIN = Enum("D2D1_FIGURE_BEGIN", [
208 "D2D1_FIGURE_BEGIN_FILLED",
209 "D2D1_FIGURE_BEGIN_HOLLOW",
212 D2D1_FIGURE_END = Enum("D2D1_FIGURE_END", [
213 "D2D1_FIGURE_END_OPEN",
214 "D2D1_FIGURE_END_CLOSED",
217 D2D1_BEZIER_SEGMENT = Struct("D2D1_BEZIER_SEGMENT", [
218 (D2D1_POINT_2F, "point1"),
219 (D2D1_POINT_2F, "point2"),
220 (D2D1_POINT_2F, "point3"),
223 D2D1_TRIANGLE = Struct("D2D1_TRIANGLE", [
224 (D2D1_POINT_2F, "point1"),
225 (D2D1_POINT_2F, "point2"),
226 (D2D1_POINT_2F, "point3"),
229 D2D1_PATH_SEGMENT = EnumFlag("D2D1_PATH_SEGMENT", [
230 "D2D1_PATH_SEGMENT_NONE",
231 "D2D1_PATH_SEGMENT_FORCE_UNSTROKED",
232 "D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN",
235 D2D1_SWEEP_DIRECTION = Enum("D2D1_SWEEP_DIRECTION", [
236 "D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE",
237 "D2D1_SWEEP_DIRECTION_CLOCKWISE",
240 D2D1_FILL_MODE = Enum("D2D1_FILL_MODE", [
241 "D2D1_FILL_MODE_ALTERNATE",
242 "D2D1_FILL_MODE_WINDING",
245 D2D1_ARC_SEGMENT = Struct("D2D1_ARC_SEGMENT", [
246 (D2D1_POINT_2F, "point"),
247 (D2D1_SIZE_F, "size"),
248 (FLOAT, "rotationAngle"),
249 (D2D1_SWEEP_DIRECTION, "sweepDirection"),
250 (D2D1_ARC_SIZE, "arcSize"),
253 D2D1_QUADRATIC_BEZIER_SEGMENT = Struct("D2D1_QUADRATIC_BEZIER_SEGMENT", [
254 (D2D1_POINT_2F, "point1"),
255 (D2D1_POINT_2F, "point2"),
258 D2D1_ELLIPSE = Struct("D2D1_ELLIPSE", [
259 (D2D1_POINT_2F, "point"),
264 D2D1_ROUNDED_RECT = Struct("D2D1_ROUNDED_RECT", [
265 (D2D1_RECT_F, "rect"),
270 D2D1_STROKE_STYLE_PROPERTIES = Struct("D2D1_STROKE_STYLE_PROPERTIES", [
271 (D2D1_CAP_STYLE, "startCap"),
272 (D2D1_CAP_STYLE, "endCap"),
273 (D2D1_CAP_STYLE, "dashCap"),
274 (D2D1_LINE_JOIN, "lineJoin"),
275 (FLOAT, "miterLimit"),
276 (D2D1_DASH_STYLE, "dashStyle"),
277 (FLOAT, "dashOffset"),
280 D2D1_LAYER_OPTIONS = EnumFlag("D2D1_LAYER_OPTIONS", [
281 "D2D1_LAYER_OPTIONS_NONE",
282 "D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE",
285 D2D1_LAYER_PARAMETERS = Struct("D2D1_LAYER_PARAMETERS", [
286 (D2D1_RECT_F, "contentBounds"),
287 (ObjPointer(ID2D1Geometry), "geometricMask"),
288 (D2D1_ANTIALIAS_MODE, "maskAntialiasMode"),
289 (D2D1_MATRIX_3X2_F, "maskTransform"),
291 (ObjPointer(ID2D1Brush), "opacityBrush"),
292 (D2D1_LAYER_OPTIONS, "layerOptions"),
295 D2D1_WINDOW_STATE = EnumFlag("D2D1_WINDOW_STATE", [
296 "D2D1_WINDOW_STATE_NONE",
297 "D2D1_WINDOW_STATE_OCCLUDED",
300 D2D1_RENDER_TARGET_TYPE = Enum("D2D1_RENDER_TARGET_TYPE", [
301 "D2D1_RENDER_TARGET_TYPE_DEFAULT",
302 "D2D1_RENDER_TARGET_TYPE_SOFTWARE",
303 "D2D1_RENDER_TARGET_TYPE_HARDWARE",
306 D2D1_FEATURE_LEVEL = Enum("D2D1_FEATURE_LEVEL", [
307 "D2D1_FEATURE_LEVEL_DEFAULT",
308 "D2D1_FEATURE_LEVEL_9",
309 "D2D1_FEATURE_LEVEL_10",
312 D2D1_RENDER_TARGET_USAGE = EnumFlag("D2D1_RENDER_TARGET_USAGE", [
313 "D2D1_RENDER_TARGET_USAGE_NONE",
314 "D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING",
315 "D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE",
318 D2D1_PRESENT_OPTIONS = EnumFlag("D2D1_PRESENT_OPTIONS", [
319 "D2D1_PRESENT_OPTIONS_NONE",
320 "D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS",
321 "D2D1_PRESENT_OPTIONS_IMMEDIATELY",
324 D2D1_RENDER_TARGET_PROPERTIES = Struct("D2D1_RENDER_TARGET_PROPERTIES", [
325 (D2D1_RENDER_TARGET_TYPE, "type"),
326 (D2D1_PIXEL_FORMAT, "pixelFormat"),
329 (D2D1_RENDER_TARGET_USAGE, "usage"),
330 (D2D1_FEATURE_LEVEL, "minLevel"),
333 D2D1_HWND_RENDER_TARGET_PROPERTIES = Struct("D2D1_HWND_RENDER_TARGET_PROPERTIES", [
335 (D2D1_SIZE_U, "pixelSize"),
336 (D2D1_PRESENT_OPTIONS, "presentOptions"),
339 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS = EnumFlag("D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS", [
340 "D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE",
341 "D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE",
344 D2D1_DRAWING_STATE_DESCRIPTION = Struct("D2D1_DRAWING_STATE_DESCRIPTION", [
345 (D2D1_ANTIALIAS_MODE, "antialiasMode"),
346 (D2D1_TEXT_ANTIALIAS_MODE, "textAntialiasMode"),
349 (D2D1_MATRIX_3X2_F, "transform"),
352 D2D1_DC_INITIALIZE_MODE = Enum("D2D1_DC_INITIALIZE_MODE", [
353 "D2D1_DC_INITIALIZE_MODE_COPY",
354 "D2D1_DC_INITIALIZE_MODE_CLEAR",
357 D2D1_DEBUG_LEVEL = Enum("D2D1_DEBUG_LEVEL", [
358 "D2D1_DEBUG_LEVEL_NONE",
359 "D2D1_DEBUG_LEVEL_ERROR",
360 "D2D1_DEBUG_LEVEL_WARNING",
361 "D2D1_DEBUG_LEVEL_INFORMATION",
364 D2D1_FACTORY_TYPE = Enum("D2D1_FACTORY_TYPE", [
365 "D2D1_FACTORY_TYPE_SINGLE_THREADED",
366 "D2D1_FACTORY_TYPE_MULTI_THREADED",
369 D2D1_FACTORY_OPTIONS = Struct("D2D1_FACTORY_OPTIONS", [
370 (D2D1_DEBUG_LEVEL, "debugLevel"),
373 ID2D1Resource.methods += [
374 StdMethod(Void, "GetFactory", [Out(Pointer(ObjPointer(ID2D1Factory)), "factory")], const=True),
377 ID2D1Bitmap.methods += [
378 StdMethod(D2D1_SIZE_F, "GetSize", [], const=True),
379 StdMethod(D2D1_SIZE_U, "GetPixelSize", [], const=True),
380 StdMethod(D2D1_PIXEL_FORMAT, "GetPixelFormat", [], const=True),
381 StdMethod(Void, "GetDpi", [Out(Pointer(FLOAT), "dpiX"), Out(Pointer(FLOAT), "dpiY")], const=True),
382 StdMethod(HRESULT, "CopyFromBitmap", [(Pointer(Const(D2D1_POINT_2U)), "destPoint"), (ObjPointer(ID2D1Bitmap), "bitmap"), (Pointer(Const(D2D1_RECT_U)), "srcRect")]),
383 StdMethod(HRESULT, "CopyFromRenderTarget", [(Pointer(Const(D2D1_POINT_2U)), "destPoint"), (ObjPointer(ID2D1RenderTarget), "renderTarget"), (Pointer(Const(D2D1_RECT_U)), "srcRect")]),
384 StdMethod(HRESULT, "CopyFromMemory", [(Pointer(Const(D2D1_RECT_U)), "dstRect"), (OpaquePointer(Const(Void)), "srcData"), (UINT32, "pitch")]),
387 ID2D1GradientStopCollection.methods += [
388 StdMethod(UINT32, "GetGradientStopCount", [], const=True),
389 StdMethod(Void, "GetGradientStops", [Out(Pointer(D2D1_GRADIENT_STOP), "gradientStops"), (UINT, "gradientStopsCount")], const=True),
390 StdMethod(D2D1_GAMMA, "GetColorInterpolationGamma", [], const=True),
391 StdMethod(D2D1_EXTEND_MODE, "GetExtendMode", [], const=True),
394 ID2D1Brush.methods += [
395 StdMethod(Void, "SetOpacity", [(FLOAT, "opacity")]),
396 StdMethod(Void, "SetTransform", [(Pointer(Const(D2D1_MATRIX_3X2_F)), "transform")]),
397 StdMethod(FLOAT, "GetOpacity", [], const=True),
398 StdMethod(Void, "GetTransform", [Out(Pointer(D2D1_MATRIX_3X2_F), "transform")], const=True),
401 ID2D1BitmapBrush.methods += [
402 StdMethod(Void, "SetExtendModeX", [(D2D1_EXTEND_MODE, "extendModeX")]),
403 StdMethod(Void, "SetExtendModeY", [(D2D1_EXTEND_MODE, "extendModeY")]),
404 StdMethod(Void, "SetInterpolationMode", [(D2D1_BITMAP_INTERPOLATION_MODE, "interpolationMode")]),
405 StdMethod(Void, "SetBitmap", [(ObjPointer(ID2D1Bitmap), "bitmap")]),
406 StdMethod(D2D1_EXTEND_MODE, "GetExtendModeX", [], const=True),
407 StdMethod(D2D1_EXTEND_MODE, "GetExtendModeY", [], const=True),
408 StdMethod(D2D1_BITMAP_INTERPOLATION_MODE, "GetInterpolationMode", [], const=True),
409 StdMethod(Void, "GetBitmap", [Out(Pointer(ObjPointer(ID2D1Bitmap)), "bitmap")], const=True),
412 ID2D1SolidColorBrush.methods += [
413 StdMethod(Void, "SetColor", [(Pointer(Const(D2D1_COLOR_F)), "color")]),
414 StdMethod(D2D1_COLOR_F, "GetColor", [], const=True),
417 ID2D1LinearGradientBrush.methods += [
418 StdMethod(Void, "SetStartPoint", [(D2D1_POINT_2F, "startPoint")]),
419 StdMethod(Void, "SetEndPoint", [(D2D1_POINT_2F, "endPoint")]),
420 StdMethod(D2D1_POINT_2F, "GetStartPoint", [], const=True),
421 StdMethod(D2D1_POINT_2F, "GetEndPoint", [], const=True),
422 StdMethod(Void, "GetGradientStopCollection", [Out(Pointer(ObjPointer(ID2D1GradientStopCollection)), "gradientStopCollection")], const=True),
425 ID2D1RadialGradientBrush.methods += [
426 StdMethod(Void, "SetCenter", [(D2D1_POINT_2F, "center")]),
427 StdMethod(Void, "SetGradientOriginOffset", [(D2D1_POINT_2F, "gradientOriginOffset")]),
428 StdMethod(Void, "SetRadiusX", [(FLOAT, "radiusX")]),
429 StdMethod(Void, "SetRadiusY", [(FLOAT, "radiusY")]),
430 StdMethod(D2D1_POINT_2F, "GetCenter", [], const=True),
431 StdMethod(D2D1_POINT_2F, "GetGradientOriginOffset", [], const=True),
432 StdMethod(FLOAT, "GetRadiusX", [], const=True),
433 StdMethod(FLOAT, "GetRadiusY", [], const=True),
434 StdMethod(Void, "GetGradientStopCollection", [Out(Pointer(ObjPointer(ID2D1GradientStopCollection)), "gradientStopCollection")], const=True),
437 ID2D1StrokeStyle.methods += [
438 StdMethod(D2D1_CAP_STYLE, "GetStartCap", [], const=True),
439 StdMethod(D2D1_CAP_STYLE, "GetEndCap", [], const=True),
440 StdMethod(D2D1_CAP_STYLE, "GetDashCap", [], const=True),
441 StdMethod(FLOAT, "GetMiterLimit", [], const=True),
442 StdMethod(D2D1_LINE_JOIN, "GetLineJoin", [], const=True),
443 StdMethod(FLOAT, "GetDashOffset", [], const=True),
444 StdMethod(D2D1_DASH_STYLE, "GetDashStyle", [], const=True),
445 StdMethod(UINT32, "GetDashesCount", [], const=True),
446 StdMethod(Void, "GetDashes", [Out(Array(FLOAT, "dashesCount"), "dashes"), (UINT, "dashesCount")], const=True),
449 ID2D1Geometry.methods += [
450 StdMethod(HRESULT, "GetBounds", [(Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), Out(Pointer(D2D1_RECT_F), "bounds")], const=True),
451 StdMethod(HRESULT, "GetWidenedBounds", [(FLOAT, "strokeWidth"), (ObjPointer(ID2D1StrokeStyle), "strokeStyle"), (Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), (FLOAT, "flatteningTolerance"), Out(Pointer(D2D1_RECT_F), "bounds")], const=True),
452 StdMethod(HRESULT, "StrokeContainsPoint", [(D2D1_POINT_2F, "point"), (FLOAT, "strokeWidth"), (ObjPointer(ID2D1StrokeStyle), "strokeStyle"), (Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), (FLOAT, "flatteningTolerance"), Out(Pointer(BOOL), "contains")], const=True),
453 StdMethod(HRESULT, "FillContainsPoint", [(D2D1_POINT_2F, "point"), (Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), (FLOAT, "flatteningTolerance"), Out(Pointer(BOOL), "contains")], const=True),
454 StdMethod(HRESULT, "CompareWithGeometry", [(ObjPointer(ID2D1Geometry), "inputGeometry"), (Pointer(Const(D2D1_MATRIX_3X2_F)), "inputGeometryTransform"), (FLOAT, "flatteningTolerance"), Out(Pointer(D2D1_GEOMETRY_RELATION), "relation")], const=True),
455 StdMethod(HRESULT, "Simplify", [(D2D1_GEOMETRY_SIMPLIFICATION_OPTION, "simplificationOption"), (Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), (FLOAT, "flatteningTolerance"), (ObjPointer(ID2D1SimplifiedGeometrySink), "geometrySink")], const=True),
456 StdMethod(HRESULT, "Tessellate", [(Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), (FLOAT, "flatteningTolerance"), (ObjPointer(ID2D1TessellationSink), "tessellationSink")], const=True),
457 StdMethod(HRESULT, "CombineWithGeometry", [(ObjPointer(ID2D1Geometry), "inputGeometry"), (D2D1_COMBINE_MODE, "combineMode"), (Pointer(Const(D2D1_MATRIX_3X2_F)), "inputGeometryTransform"), (FLOAT, "flatteningTolerance"), (ObjPointer(ID2D1SimplifiedGeometrySink), "geometrySink")], const=True),
458 StdMethod(HRESULT, "Outline", [(Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), (FLOAT, "flatteningTolerance"), (ObjPointer(ID2D1SimplifiedGeometrySink), "geometrySink")], const=True),
459 StdMethod(HRESULT, "ComputeArea", [(Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), (FLOAT, "flatteningTolerance"), Out(Pointer(FLOAT), "area")], const=True),
460 StdMethod(HRESULT, "ComputeLength", [(Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), (FLOAT, "flatteningTolerance"), Out(Pointer(FLOAT), "length")], const=True),
461 StdMethod(HRESULT, "ComputePointAtLength", [(FLOAT, "length"), (Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), (FLOAT, "flatteningTolerance"), Out(Pointer(D2D1_POINT_2F), "point"), Out(Pointer(D2D1_POINT_2F), "unitTangentVector")], const=True),
462 StdMethod(HRESULT, "Widen", [(FLOAT, "strokeWidth"), (ObjPointer(ID2D1StrokeStyle), "strokeStyle"), (Pointer(Const(D2D1_MATRIX_3X2_F)), "worldTransform"), (FLOAT, "flatteningTolerance"), (ObjPointer(ID2D1SimplifiedGeometrySink), "geometrySink")], const=True),
465 ID2D1RectangleGeometry.methods += [
466 StdMethod(Void, "GetRect", [Out(Pointer(D2D1_RECT_F), "rect")], const=True),
469 ID2D1RoundedRectangleGeometry.methods += [
470 StdMethod(Void, "GetRoundedRect", [Out(Pointer(D2D1_ROUNDED_RECT), "roundedRect")], const=True),
473 ID2D1EllipseGeometry.methods += [
474 StdMethod(Void, "GetEllipse", [Out(Pointer(D2D1_ELLIPSE), "ellipse")], const=True),
477 ID2D1GeometryGroup.methods += [
478 StdMethod(D2D1_FILL_MODE, "GetFillMode", [], const=True),
479 StdMethod(UINT32, "GetSourceGeometryCount", [], const=True),
480 StdMethod(Void, "GetSourceGeometries", [Out(Array(ObjPointer(ID2D1Geometry), "geometriesCount"), "geometries"), (UINT, "geometriesCount")], const=True),
483 ID2D1TransformedGeometry.methods += [
484 StdMethod(Void, "GetSourceGeometry", [Out(Pointer(ObjPointer(ID2D1Geometry)), "sourceGeometry")], const=True),
485 StdMethod(Void, "GetTransform", [Out(Pointer(D2D1_MATRIX_3X2_F), "transform")], const=True),
488 ID2D1SimplifiedGeometrySink.methods += [
489 StdMethod(Void, "SetFillMode", [(D2D1_FILL_MODE, "fillMode")]),
490 StdMethod(Void, "SetSegmentFlags", [(D2D1_PATH_SEGMENT, "vertexFlags")]),
491 StdMethod(Void, "BeginFigure", [(D2D1_POINT_2F, "startPoint"), (D2D1_FIGURE_BEGIN, "figureBegin")]),
492 StdMethod(Void, "AddLines", [(Array(Const(D2D1_POINT_2F), "pointsCount"), "points"), (UINT, "pointsCount")]),
493 StdMethod(Void, "AddBeziers", [(Array(Const(D2D1_BEZIER_SEGMENT), "beziersCount"), "beziers"), (UINT, "beziersCount")]),
494 StdMethod(Void, "EndFigure", [(D2D1_FIGURE_END, "figureEnd")]),
495 StdMethod(HRESULT, "Close", []),
498 ID2D1GeometrySink.methods += [
499 StdMethod(Void, "AddLine", [(D2D1_POINT_2F, "point")]),
500 StdMethod(Void, "AddBezier", [(Pointer(Const(D2D1_BEZIER_SEGMENT)), "bezier")]),
501 StdMethod(Void, "AddQuadraticBezier", [(Pointer(Const(D2D1_QUADRATIC_BEZIER_SEGMENT)), "bezier")]),
502 StdMethod(Void, "AddQuadraticBeziers", [(Array(Const(D2D1_QUADRATIC_BEZIER_SEGMENT), "beziersCount"), "beziers"), (UINT, "beziersCount")]),
503 StdMethod(Void, "AddArc", [(Pointer(Const(D2D1_ARC_SEGMENT)), "arc")]),
506 ID2D1TessellationSink.methods += [
507 StdMethod(Void, "AddTriangles", [(Array(Const(D2D1_TRIANGLE), "trianglesCount"), "triangles"), (UINT, "trianglesCount")]),
508 StdMethod(HRESULT, "Close", []),
511 ID2D1PathGeometry.methods += [
512 StdMethod(HRESULT, "Open", [Out(Pointer(ObjPointer(ID2D1GeometrySink)), "geometrySink")]),
513 StdMethod(HRESULT, "Stream", [(ObjPointer(ID2D1GeometrySink), "geometrySink")], const=True),
514 StdMethod(HRESULT, "GetSegmentCount", [Out(Pointer(UINT32), "count")], const=True),
515 StdMethod(HRESULT, "GetFigureCount", [Out(Pointer(UINT32), "count")], const=True),
518 ID2D1Mesh.methods += [
519 StdMethod(HRESULT, "Open", [Out(Pointer(ObjPointer(ID2D1TessellationSink)), "tessellationSink")]),
522 ID2D1Layer.methods += [
523 StdMethod(D2D1_SIZE_F, "GetSize", [], const=True),
526 ID2D1DrawingStateBlock.methods += [
527 StdMethod(Void, "GetDescription", [Out(Pointer(D2D1_DRAWING_STATE_DESCRIPTION), "stateDescription")], const=True),
528 StdMethod(Void, "SetDescription", [(Pointer(Const(D2D1_DRAWING_STATE_DESCRIPTION)), "stateDescription")]),
529 StdMethod(Void, "SetTextRenderingParams", [(ObjPointer(IDWriteRenderingParams), "textRenderingParams")]),
530 StdMethod(Void, "GetTextRenderingParams", [Out(Pointer(ObjPointer(IDWriteRenderingParams)), "textRenderingParams")], const=True),
533 ID2D1RenderTarget.methods += [
534 StdMethod(HRESULT, "CreateBitmap", [(D2D1_SIZE_U, "size"), (OpaquePointer(Const(Void)), "srcData"), (UINT32, "pitch"), (Pointer(Const(D2D1_BITMAP_PROPERTIES)), "bitmapProperties"), Out(Pointer(ObjPointer(ID2D1Bitmap)), "bitmap")]),
535 StdMethod(HRESULT, "CreateBitmapFromWicBitmap", [(Opaque("IWICBitmapSource *"), "wicBitmapSource"), (Pointer(Const(D2D1_BITMAP_PROPERTIES)), "bitmapProperties"), Out(Pointer(ObjPointer(ID2D1Bitmap)), "bitmap")]),
536 StdMethod(HRESULT, "CreateSharedBitmap", [(REFIID, "riid"), Out(OpaquePointer(Void), "data"), (Pointer(Const(D2D1_BITMAP_PROPERTIES)), "bitmapProperties"), Out(Pointer(ObjPointer(ID2D1Bitmap)), "bitmap")]),
537 StdMethod(HRESULT, "CreateBitmapBrush", [(ObjPointer(ID2D1Bitmap), "bitmap"), (Pointer(Const(D2D1_BITMAP_BRUSH_PROPERTIES)), "bitmapBrushProperties"), (Pointer(Const(D2D1_BRUSH_PROPERTIES)), "brushProperties"), Out(Pointer(ObjPointer(ID2D1BitmapBrush)), "bitmapBrush")]),
538 StdMethod(HRESULT, "CreateSolidColorBrush", [(Pointer(Const(D2D1_COLOR_F)), "color"), (Pointer(Const(D2D1_BRUSH_PROPERTIES)), "brushProperties"), Out(Pointer(ObjPointer(ID2D1SolidColorBrush)), "solidColorBrush")]),
539 StdMethod(HRESULT, "CreateGradientStopCollection", [(Array(Const(D2D1_GRADIENT_STOP), "gradientStopsCount"), "gradientStops"), (UINT, "gradientStopsCount"), (D2D1_GAMMA, "colorInterpolationGamma"), (D2D1_EXTEND_MODE, "extendMode"), Out(Pointer(ObjPointer(ID2D1GradientStopCollection)), "gradientStopCollection")]),
540 StdMethod(HRESULT, "CreateLinearGradientBrush", [(Pointer(Const(D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES)), "linearGradientBrushProperties"), (Pointer(Const(D2D1_BRUSH_PROPERTIES)), "brushProperties"), (ObjPointer(ID2D1GradientStopCollection), "gradientStopCollection"), Out(Pointer(ObjPointer(ID2D1LinearGradientBrush)), "linearGradientBrush")]),
541 StdMethod(HRESULT, "CreateRadialGradientBrush", [(Pointer(Const(D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES)), "radialGradientBrushProperties"), (Pointer(Const(D2D1_BRUSH_PROPERTIES)), "brushProperties"), (ObjPointer(ID2D1GradientStopCollection), "gradientStopCollection"), Out(Pointer(ObjPointer(ID2D1RadialGradientBrush)), "radialGradientBrush")]),
542 StdMethod(HRESULT, "CreateCompatibleRenderTarget", [(Pointer(Const(D2D1_SIZE_F)), "desiredSize"), (Pointer(Const(D2D1_SIZE_U)), "desiredPixelSize"), (Pointer(Const(D2D1_PIXEL_FORMAT)), "desiredFormat"), (D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS, "options"), Out(Pointer(ObjPointer(ID2D1BitmapRenderTarget)), "bitmapRenderTarget")]),
543 StdMethod(HRESULT, "CreateLayer", [(Pointer(Const(D2D1_SIZE_F)), "size"), Out(Pointer(ObjPointer(ID2D1Layer)), "layer")]),
544 StdMethod(HRESULT, "CreateMesh", [Out(Pointer(ObjPointer(ID2D1Mesh)), "mesh")]),
545 StdMethod(Void, "DrawLine", [(D2D1_POINT_2F, "point0"), (D2D1_POINT_2F, "point1"), (ObjPointer(ID2D1Brush), "brush"), (FLOAT, "strokeWidth"), (ObjPointer(ID2D1StrokeStyle), "strokeStyle")]),
546 StdMethod(Void, "DrawRectangle", [(Pointer(Const(D2D1_RECT_F)), "rect"), (ObjPointer(ID2D1Brush), "brush"), (FLOAT, "strokeWidth"), (ObjPointer(ID2D1StrokeStyle), "strokeStyle")]),
547 StdMethod(Void, "FillRectangle", [(Pointer(Const(D2D1_RECT_F)), "rect"), (ObjPointer(ID2D1Brush), "brush")]),
548 StdMethod(Void, "DrawRoundedRectangle", [(Pointer(Const(D2D1_ROUNDED_RECT)), "roundedRect"), (ObjPointer(ID2D1Brush), "brush"), (FLOAT, "strokeWidth"), (ObjPointer(ID2D1StrokeStyle), "strokeStyle")]),
549 StdMethod(Void, "FillRoundedRectangle", [(Pointer(Const(D2D1_ROUNDED_RECT)), "roundedRect"), (ObjPointer(ID2D1Brush), "brush")]),
550 StdMethod(Void, "DrawEllipse", [(Pointer(Const(D2D1_ELLIPSE)), "ellipse"), (ObjPointer(ID2D1Brush), "brush"), (FLOAT, "strokeWidth"), (ObjPointer(ID2D1StrokeStyle), "strokeStyle")]),
551 StdMethod(Void, "FillEllipse", [(Pointer(Const(D2D1_ELLIPSE)), "ellipse"), (ObjPointer(ID2D1Brush), "brush")]),
552 StdMethod(Void, "DrawGeometry", [(ObjPointer(ID2D1Geometry), "geometry"), (ObjPointer(ID2D1Brush), "brush"), (FLOAT, "strokeWidth"), (ObjPointer(ID2D1StrokeStyle), "strokeStyle")]),
553 StdMethod(Void, "FillGeometry", [(ObjPointer(ID2D1Geometry), "geometry"), (ObjPointer(ID2D1Brush), "brush"), (ObjPointer(ID2D1Brush), "opacityBrush")]),
554 StdMethod(Void, "FillMesh", [(ObjPointer(ID2D1Mesh), "mesh"), (ObjPointer(ID2D1Brush), "brush")]),
555 StdMethod(Void, "FillOpacityMask", [(ObjPointer(ID2D1Bitmap), "opacityMask"), (ObjPointer(ID2D1Brush), "brush"), (D2D1_OPACITY_MASK_CONTENT, "content"), (Pointer(Const(D2D1_RECT_F)), "destinationRectangle"), (Pointer(Const(D2D1_RECT_F)), "sourceRectangle")]),
556 StdMethod(Void, "DrawBitmap", [(ObjPointer(ID2D1Bitmap), "bitmap"), (Pointer(Const(D2D1_RECT_F)), "destinationRectangle"), (FLOAT, "opacity"), (D2D1_BITMAP_INTERPOLATION_MODE, "interpolationMode"), (Pointer(Const(D2D1_RECT_F)), "sourceRectangle")]),
557 StdMethod(Void, "DrawText", [(Pointer(Const(WCHAR)), "string"), (UINT, "stringLength"), (ObjPointer(IDWriteTextFormat), "textFormat"), (Pointer(Const(D2D1_RECT_F)), "layoutRect"), (ObjPointer(ID2D1Brush), "defaultForegroundBrush"), (D2D1_DRAW_TEXT_OPTIONS, "options"), (DWRITE_MEASURING_MODE, "measuringMode")]),
558 StdMethod(Void, "DrawTextLayout", [(D2D1_POINT_2F, "origin"), (ObjPointer(IDWriteTextLayout), "textLayout"), (ObjPointer(ID2D1Brush), "defaultForegroundBrush"), (D2D1_DRAW_TEXT_OPTIONS, "options")]),
559 StdMethod(Void, "DrawGlyphRun", [(D2D1_POINT_2F, "baselineOrigin"), (Pointer(Const(DWRITE_GLYPH_RUN)), "glyphRun"), (ObjPointer(ID2D1Brush), "foregroundBrush"), (DWRITE_MEASURING_MODE, "measuringMode")]),
560 StdMethod(Void, "SetTransform", [(Pointer(Const(D2D1_MATRIX_3X2_F)), "transform")]),
561 StdMethod(Void, "GetTransform", [Out(Pointer(D2D1_MATRIX_3X2_F), "transform")], const=True),
562 StdMethod(Void, "SetAntialiasMode", [(D2D1_ANTIALIAS_MODE, "antialiasMode")]),
563 StdMethod(D2D1_ANTIALIAS_MODE, "GetAntialiasMode", [], const=True),
564 StdMethod(Void, "SetTextAntialiasMode", [(D2D1_TEXT_ANTIALIAS_MODE, "textAntialiasMode")]),
565 StdMethod(D2D1_TEXT_ANTIALIAS_MODE, "GetTextAntialiasMode", [], const=True),
566 StdMethod(Void, "SetTextRenderingParams", [(ObjPointer(IDWriteRenderingParams), "textRenderingParams")]),
567 StdMethod(Void, "GetTextRenderingParams", [Out(Pointer(ObjPointer(IDWriteRenderingParams)), "textRenderingParams")], const=True),
568 StdMethod(Void, "SetTags", [(D2D1_TAG, "tag1"), (D2D1_TAG, "tag2")]),
569 StdMethod(Void, "GetTags", [Out(Pointer(D2D1_TAG), "tag1"), Out(Pointer(D2D1_TAG), "tag2")], const=True),
570 StdMethod(Void, "PushLayer", [(Pointer(Const(D2D1_LAYER_PARAMETERS)), "layerParameters"), (ObjPointer(ID2D1Layer), "layer")]),
571 StdMethod(Void, "PopLayer", []),
572 StdMethod(HRESULT, "Flush", [Out(Pointer(D2D1_TAG), "tag1"), Out(Pointer(D2D1_TAG), "tag2")]),
573 StdMethod(Void, "SaveDrawingState", [(ObjPointer(ID2D1DrawingStateBlock), "drawingStateBlock")], const=True),
574 StdMethod(Void, "RestoreDrawingState", [(ObjPointer(ID2D1DrawingStateBlock), "drawingStateBlock")]),
575 StdMethod(Void, "PushAxisAlignedClip", [(Pointer(Const(D2D1_RECT_F)), "clipRect"), (D2D1_ANTIALIAS_MODE, "antialiasMode")]),
576 StdMethod(Void, "PopAxisAlignedClip", []),
577 StdMethod(Void, "Clear", [(Pointer(Const(D2D1_COLOR_F)), "clearColor")]),
578 StdMethod(Void, "BeginDraw", []),
579 StdMethod(HRESULT, "EndDraw", [Out(Pointer(D2D1_TAG), "tag1"), Out(Pointer(D2D1_TAG), "tag2")]),
580 StdMethod(D2D1_PIXEL_FORMAT, "GetPixelFormat", [], const=True),
581 StdMethod(Void, "SetDpi", [(FLOAT, "dpiX"), (FLOAT, "dpiY")]),
582 StdMethod(Void, "GetDpi", [Out(Pointer(FLOAT), "dpiX"), Out(Pointer(FLOAT), "dpiY")], const=True),
583 StdMethod(D2D1_SIZE_F, "GetSize", [], const=True),
584 StdMethod(D2D1_SIZE_U, "GetPixelSize", [], const=True),
585 StdMethod(UINT32, "GetMaximumBitmapSize", [], const=True),
586 StdMethod(BOOL, "IsSupported", [(Pointer(Const(D2D1_RENDER_TARGET_PROPERTIES)), "renderTargetProperties")], const=True),
589 ID2D1BitmapRenderTarget.methods += [
590 StdMethod(HRESULT, "GetBitmap", [Out(Pointer(ObjPointer(ID2D1Bitmap)), "bitmap")]),
593 ID2D1HwndRenderTarget.methods += [
594 StdMethod(D2D1_WINDOW_STATE, "CheckWindowState", []),
595 StdMethod(HRESULT, "Resize", [(Pointer(Const(D2D1_SIZE_U)), "pixelSize")]),
596 StdMethod(HWND, "GetHwnd", [], const=True),
599 ID2D1GdiInteropRenderTarget.methods += [
600 StdMethod(HRESULT, "GetDC", [(D2D1_DC_INITIALIZE_MODE, "mode"), Out(Pointer(HDC), "hdc")]),
601 StdMethod(HRESULT, "ReleaseDC", [(Pointer(Const(RECT)), "update")]),
604 ID2D1DCRenderTarget.methods += [
605 StdMethod(HRESULT, "BindDC", [(Const(HDC), "hDC"), (Pointer(Const(RECT)), "pSubRect")]),
608 ID2D1Factory.methods += [
609 StdMethod(HRESULT, "ReloadSystemMetrics", []),
610 StdMethod(Void, "GetDesktopDpi", [Out(Pointer(FLOAT), "dpiX"), Out(Pointer(FLOAT), "dpiY")]),
611 StdMethod(HRESULT, "CreateRectangleGeometry", [(Pointer(Const(D2D1_RECT_F)), "rectangle"), Out(Pointer(ObjPointer(ID2D1RectangleGeometry)), "rectangleGeometry")]),
612 StdMethod(HRESULT, "CreateRoundedRectangleGeometry", [(Pointer(Const(D2D1_ROUNDED_RECT)), "roundedRectangle"), Out(Pointer(ObjPointer(ID2D1RoundedRectangleGeometry)), "roundedRectangleGeometry")]),
613 StdMethod(HRESULT, "CreateEllipseGeometry", [(Pointer(Const(D2D1_ELLIPSE)), "ellipse"), Out(Pointer(ObjPointer(ID2D1EllipseGeometry)), "ellipseGeometry")]),
614 StdMethod(HRESULT, "CreateGeometryGroup", [(D2D1_FILL_MODE, "fillMode"), (Pointer(ObjPointer(ID2D1Geometry)), "geometries"), (UINT, "geometriesCount"), Out(Pointer(ObjPointer(ID2D1GeometryGroup)), "geometryGroup")]),
615 StdMethod(HRESULT, "CreateTransformedGeometry", [(ObjPointer(ID2D1Geometry), "sourceGeometry"), (Pointer(Const(D2D1_MATRIX_3X2_F)), "transform"), Out(Pointer(ObjPointer(ID2D1TransformedGeometry)), "transformedGeometry")]),
616 StdMethod(HRESULT, "CreatePathGeometry", [Out(Pointer(ObjPointer(ID2D1PathGeometry)), "pathGeometry")]),
617 StdMethod(HRESULT, "CreateStrokeStyle", [(Pointer(Const(D2D1_STROKE_STYLE_PROPERTIES)), "strokeStyleProperties"), (Pointer(Const(FLOAT)), "dashes"), (UINT, "dashesCount"), Out(Pointer(ObjPointer(ID2D1StrokeStyle)), "strokeStyle")]),
618 StdMethod(HRESULT, "CreateDrawingStateBlock", [(Pointer(Const(D2D1_DRAWING_STATE_DESCRIPTION)), "drawingStateDescription"), (ObjPointer(IDWriteRenderingParams), "textRenderingParams"), Out(Pointer(ObjPointer(ID2D1DrawingStateBlock)), "drawingStateBlock")]),
619 StdMethod(HRESULT, "CreateWicBitmapRenderTarget", [(Opaque("IWICBitmap *"), "target"), (Pointer(Const(D2D1_RENDER_TARGET_PROPERTIES)), "renderTargetProperties"), Out(Pointer(ObjPointer(ID2D1RenderTarget)), "renderTarget")]),
620 StdMethod(HRESULT, "CreateHwndRenderTarget", [(Pointer(Const(D2D1_RENDER_TARGET_PROPERTIES)), "renderTargetProperties"), (Pointer(Const(D2D1_HWND_RENDER_TARGET_PROPERTIES)), "hwndRenderTargetProperties"), Out(Pointer(ObjPointer(ID2D1HwndRenderTarget)), "hwndRenderTarget")]),
621 StdMethod(HRESULT, "CreateDxgiSurfaceRenderTarget", [(ObjPointer(IDXGISurface), "dxgiSurface"), (Pointer(Const(D2D1_RENDER_TARGET_PROPERTIES)), "renderTargetProperties"), Out(Pointer(ObjPointer(ID2D1RenderTarget)), "renderTarget")]),
622 StdMethod(HRESULT, "CreateDCRenderTarget", [(Pointer(Const(D2D1_RENDER_TARGET_PROPERTIES)), "renderTargetProperties"), Out(Pointer(ObjPointer(ID2D1DCRenderTarget)), "dcRenderTarget")]),
625 d2d1 = Module("d2d1")
630 StdFunction(HRESULT, "D2D1CreateFactory", [(D2D1_FACTORY_TYPE, "factoryType"), (REFIID, "riid"), (Pointer(Const(D2D1_FACTORY_OPTIONS)), "pFactoryOptions"), Out(Pointer(ObjPointer(Void)), "ppIFactory")]),
631 StdFunction(Void, "D2D1MakeRotateMatrix", [(FLOAT, "angle"), (D2D1_POINT_2F, "center"), Out(Pointer(D2D1_MATRIX_3X2_F), "matrix")]),
632 StdFunction(Void, "D2D1MakeSkewMatrix", [(FLOAT, "angleX"), (FLOAT, "angleY"), (D2D1_POINT_2F, "center"), Out(Pointer(D2D1_MATRIX_3X2_F), "matrix")]),
633 StdFunction(BOOL, "D2D1IsMatrixInvertible", [(Pointer(Const(D2D1_MATRIX_3X2_F)), "matrix")]),
634 StdFunction(BOOL, "D2D1InvertMatrix", [InOut(Pointer(D2D1_MATRIX_3X2_F), "matrix")]),