hidclass.sys: Use MmGetSystemAddressForMdlSafe to access MDL data.
[wine.git] / include / d2d1.idl
blob6d39e88aa21c21c0aaff5ef37848f22c95281289
1 /*
2 * Copyright 2013 Nikolay Sivov for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "unknwn.idl";
20 import "dcommon.h";
21 import "d2dbasetypes.h";
22 import "d3d10_1.idl";
23 import "d2derr.h";
25 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
26 cpp_quote("#undef DrawText")
27 cpp_quote("#endif")
29 interface ID2D1Factory;
30 interface ID2D1RenderTarget;
31 interface ID2D1BitmapRenderTarget;
32 interface ID2D1Geometry;
33 interface ID2D1Brush;
34 interface IDWriteRenderingParams;
35 interface IDWriteTextFormat;
36 interface IDWriteTextLayout;
37 interface IWICBitmapSource;
38 interface IWICBitmap;
40 cpp_quote("#ifndef __dwrite_h__")
41 /* already defined in dwrite.h but needed for WIDL */
42 typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN;
43 cpp_quote("#endif /* __dwrite_h__ */")
45 typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F;
46 typedef D2D_RECT_F D2D1_RECT_F;
47 typedef D2D_SIZE_F D2D1_SIZE_F;
48 typedef UINT64 D2D1_TAG;
49 typedef D2D_POINT_2U D2D1_POINT_2U;
50 typedef D2D_RECT_U D2D1_RECT_U;
51 typedef D2D_COLOR_F D2D1_COLOR_F;
53 enum
55 D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR = 0,
56 D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR = 1,
57 D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC = 2,
58 D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR = 3,
59 D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC = 4,
60 D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC = 5,
61 D2D1_INTERPOLATION_MODE_DEFINITION_FANT = 6,
62 D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR = 7,
65 typedef enum D2D1_DEBUG_LEVEL
67 D2D1_DEBUG_LEVEL_NONE = 0,
68 D2D1_DEBUG_LEVEL_ERROR = 1,
69 D2D1_DEBUG_LEVEL_WARNING = 2,
70 D2D1_DEBUG_LEVEL_INFORMATION = 3,
71 D2D1_DEBUG_LEVEL_FORCE_DWORD = 0xffffffff,
72 } D2D1_DEBUG_LEVEL;
74 typedef enum D2D1_FACTORY_TYPE
76 D2D1_FACTORY_TYPE_SINGLE_THREADED = 0,
77 D2D1_FACTORY_TYPE_MULTI_THREADED = 1,
78 D2D1_FACTORY_TYPE_FORCE_DWORD = 0xfffffff,
79 } D2D1_FACTORY_TYPE;
81 typedef enum D2D1_FILL_MODE
83 D2D1_FILL_MODE_ALTERNATE = 0,
84 D2D1_FILL_MODE_WINDING = 1,
85 D2D1_FILL_MODE_FORCE_DWORD = 0xffffffff
86 } D2D1_FILL_MODE;
88 typedef enum D2D1_PATH_SEGMENT
90 D2D1_PATH_SEGMENT_NONE = 0,
91 D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 1,
92 D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 2,
93 D2D1_PATH_SEGMENT_FORCE_DWORD = 0xffffffff
94 } D2D1_PATH_SEGMENT;
96 typedef enum D2D1_FIGURE_BEGIN
98 D2D1_FIGURE_BEGIN_FILLED = 0,
99 D2D1_FIGURE_BEGIN_HOLLOW = 1,
100 D2D1_FIGURE_BEGIN_FORCE_DWORD = 0xffffffff
101 } D2D1_FIGURE_BEGIN;
103 typedef enum D2D1_FIGURE_END
105 D2D1_FIGURE_END_OPEN = 0,
106 D2D1_FIGURE_END_CLOSED = 1,
107 D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff
108 } D2D1_FIGURE_END;
110 typedef enum D2D1_CAP_STYLE
112 D2D1_CAP_STYLE_FLAT = 0,
113 D2D1_CAP_STYLE_SQUARE = 1,
114 D2D1_CAP_STYLE_ROUND = 2,
115 D2D1_CAP_STYLE_TRIANGLE = 3,
116 D2D1_CAP_STYLE_FORCE_DWORD = 0xffffffff,
117 } D2D1_CAP_STYLE;
119 typedef enum D2D1_LINE_JOIN
121 D2D1_LINE_JOIN_MITER = 0,
122 D2D1_LINE_JOIN_BEVEL = 1,
123 D2D1_LINE_JOIN_ROUND = 2,
124 D2D1_LINE_JOIN_MITER_OR_BEVEL = 3,
125 D2D1_LINE_JOIN_FORCE_DWORD = 0xffffffff,
126 } D2D1_LINE_JOIN;
128 typedef enum D2D1_DASH_STYLE
130 D2D1_DASH_STYLE_SOLID = 0,
131 D2D1_DASH_STYLE_DASH = 1,
132 D2D1_DASH_STYLE_DOT = 2,
133 D2D1_DASH_STYLE_DASH_DOT = 3,
134 D2D1_DASH_STYLE_DASH_DOT_DOT = 4,
135 D2D1_DASH_STYLE_CUSTOM = 5,
136 D2D1_DASH_STYLE_FORCE_DWORD = 0xffffffff,
137 } D2D1_DASH_STYLE;
139 typedef enum D2D1_GEOMETRY_RELATION
141 D2D1_GEOMETRY_RELATION_UNKNOWN = 0,
142 D2D1_GEOMETRY_RELATION_DISJOINT = 1,
143 D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2,
144 D2D1_GEOMETRY_RELATION_CONTAINS = 3,
145 D2D1_GEOMETRY_RELATION_OVERLAP = 4,
146 D2D1_GEOMETRY_RELATION_FORCE_DWORD = 0xffffffff,
147 } D2D1_GEOMETRY_RELATION;
149 typedef enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION
151 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0,
152 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1,
153 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_FORCE_DWORD = 0xffffffff,
154 } D2D1_GEOMETRY_SIMPLIFICATION_OPTION;
156 typedef enum D2D1_COMBINE_MODE
158 D2D1_COMBINE_MODE_UNION = 0,
159 D2D1_COMBINE_MODE_INTERSECT = 1,
160 D2D1_COMBINE_MODE_XOR = 2,
161 D2D1_COMBINE_MODE_EXCLUDE = 3,
162 D2D1_COMBINE_MODE_FORCE_DWORD = 0xffffffff,
163 } D2D1_COMBINE_MODE;
165 typedef enum D2D1_SWEEP_DIRECTION
167 D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0,
168 D2D1_SWEEP_DIRECTION_CLOCKWISE = 1,
169 D2D1_SWEEP_DIRECTION_FORCE_DWORD = 0xffffffff,
170 } D2D1_SWEEP_DIRECTION;
172 typedef enum D2D1_ARC_SIZE
174 D2D1_ARC_SIZE_SMALL = 0,
175 D2D1_ARC_SIZE_LARGE = 1,
176 D2D1_ARC_SIZE_FORCE_DWORD = 0xffffffff,
177 } D2D1_ARC_SIZE;
179 typedef enum D2D1_ANTIALIAS_MODE
181 D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0,
182 D2D1_ANTIALIAS_MODE_ALIASED = 1,
183 D2D1_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff,
184 } D2D1_ANTIALIAS_MODE;
186 typedef enum D2D1_TEXT_ANTIALIAS_MODE
188 D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0,
189 D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1,
190 D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2,
191 D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3,
192 D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff,
193 } D2D1_TEXT_ANTIALIAS_MODE;
195 typedef enum D2D1_EXTEND_MODE
197 D2D1_EXTEND_MODE_CLAMP = 0,
198 D2D1_EXTEND_MODE_WRAP = 1,
199 D2D1_EXTEND_MODE_MIRROR = 2,
200 D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff,
201 } D2D1_EXTEND_MODE;
203 typedef enum D2D1_BITMAP_INTERPOLATION_MODE
205 D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
206 D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
207 D2D1_BITMAP_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
208 } D2D1_BITMAP_INTERPOLATION_MODE;
210 typedef enum D2D1_GAMMA
212 D2D1_GAMMA_2_2 = 0,
213 D2D1_GAMMA_1_0 = 1,
214 D2D1_GAMMA_FORCE_DWORD = 0xffffffff,
215 } D2D1_GAMMA;
217 typedef enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS
219 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000,
220 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001,
221 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_FORCE_DWORD = 0xffffffff,
222 } D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS;
224 typedef enum D2D1_OPACITY_MASK_CONTENT
226 D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0,
227 D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1,
228 D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2,
229 D2D1_OPACITY_MASK_CONTENT_FORCE_DWORD = 0xffffffff,
230 } D2D1_OPACITY_MASK_CONTENT;
232 typedef enum D2D1_DRAW_TEXT_OPTIONS
234 D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001,
235 D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002,
236 D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000,
237 D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD = 0xffffffff,
238 } D2D1_DRAW_TEXT_OPTIONS;
240 typedef enum D2D1_LAYER_OPTIONS
242 D2D1_LAYER_OPTIONS_NONE = 0x00000000,
243 D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001,
244 D2D1_LAYER_OPTIONS_FORCE_DWORD = 0xffffffff,
245 } D2D1_LAYER_OPTIONS;
247 typedef enum D2D1_RENDER_TARGET_TYPE
249 D2D1_RENDER_TARGET_TYPE_DEFAULT = 0,
250 D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1,
251 D2D1_RENDER_TARGET_TYPE_HARDWARE = 2,
252 D2D1_RENDER_TARGET_TYPE_FORCE_DWORD = 0xffffffff,
253 } D2D1_RENDER_TARGET_TYPE;
255 typedef enum D2D1_RENDER_TARGET_USAGE
257 D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000,
258 D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001,
259 D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002,
260 D2D1_RENDER_TARGET_USAGE_FORCE_DWORD = 0xffffffff,
261 } D2D1_RENDER_TARGET_USAGE;
263 typedef enum D2D1_FEATURE_LEVEL
265 D2D1_FEATURE_LEVEL_DEFAULT = 0,
266 D2D1_FEATURE_LEVEL_9 = D3D_FEATURE_LEVEL_9_1,
267 D2D1_FEATURE_LEVEL_10 = D3D_FEATURE_LEVEL_10_0,
268 D2D1_FEATURE_LEVEL_FORCE_DWORD = 0xffffffff,
269 } D2D1_FEATURE_LEVEL;
271 typedef enum D2D1_WINDOW_STATE
273 D2D1_WINDOW_STATE_NONE = 0x0000000,
274 D2D1_WINDOW_STATE_OCCLUDED = 0x0000001,
275 D2D1_WINDOW_STATE_FORCE_DWORD = 0xffffffff,
276 } D2D1_WINDOW_STATE;
278 typedef enum D2D1_DC_INITIALIZE_MODE
280 D2D1_DC_INITIALIZE_MODE_COPY = 0,
281 D2D1_DC_INITIALIZE_MODE_CLEAR = 1,
282 D2D1_DC_INITIALIZE_MODE_FORCE_DWORD = 0xffffffff,
283 } D2D1_DC_INITIALIZE_MODE;
285 typedef enum D2D1_PRESENT_OPTIONS
287 D2D1_PRESENT_OPTIONS_NONE = 0x00000000,
288 D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001,
289 D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002,
290 D2D1_PRESENT_OPTIONS_FORCE_DWORD = 0xffffffff,
291 } D2D1_PRESENT_OPTIONS;
293 typedef struct D2D1_BEZIER_SEGMENT
295 D2D1_POINT_2F point1;
296 D2D1_POINT_2F point2;
297 D2D1_POINT_2F point3;
298 } D2D1_BEZIER_SEGMENT;
300 typedef struct D2D1_FACTORY_OPTIONS
302 D2D1_DEBUG_LEVEL debugLevel;
303 } D2D1_FACTORY_OPTIONS;
305 typedef struct D2D1_TRIANGLE
307 D2D1_POINT_2F point1;
308 D2D1_POINT_2F point2;
309 D2D1_POINT_2F point3;
310 } D2D1_TRIANGLE;
312 typedef struct D2D1_ROUNDED_RECT
314 D2D1_RECT_F rect;
315 float radiusX;
316 float radiusY;
317 } D2D1_ROUNDED_RECT;
319 typedef struct D2D1_ELLIPSE
321 D2D1_POINT_2F point;
322 float radiusX;
323 float radiusY;
324 } D2D1_ELLIPSE;
326 typedef struct D2D1_QUADRATIC_BEZIER_SEGMENT
328 D2D1_POINT_2F point1;
329 D2D1_POINT_2F point2;
330 } D2D1_QUADRATIC_BEZIER_SEGMENT;
332 typedef struct D2D1_ARC_SEGMENT
334 D2D1_POINT_2F point;
335 D2D1_SIZE_F size;
336 float rotationAngle;
337 D2D1_SWEEP_DIRECTION sweepDirection;
338 D2D1_ARC_SIZE arcSize;
339 } D2D1_ARC_SEGMENT;
341 typedef struct D2D1_DRAWING_STATE_DESCRIPTION
343 D2D1_ANTIALIAS_MODE antialiasMode;
344 D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
345 D2D1_TAG tag1;
346 D2D1_TAG tag2;
347 D2D1_MATRIX_3X2_F transform;
348 } D2D1_DRAWING_STATE_DESCRIPTION;
350 typedef struct D2D1_GRADIENT_STOP
352 float position;
353 D2D1_COLOR_F color;
354 } D2D1_GRADIENT_STOP;
356 typedef struct D2D1_BITMAP_PROPERTIES
358 D2D1_PIXEL_FORMAT pixelFormat;
359 float dpiX;
360 float dpiY;
361 } D2D1_BITMAP_PROPERTIES;
363 typedef struct D2D1_BITMAP_BRUSH_PROPERTIES
365 D2D1_EXTEND_MODE extendModeX;
366 D2D1_EXTEND_MODE extendModeY;
367 D2D1_BITMAP_INTERPOLATION_MODE interpolationMode;
368 } D2D1_BITMAP_BRUSH_PROPERTIES;
370 typedef struct D2D1_BRUSH_PROPERTIES
372 float opacity;
373 D2D1_MATRIX_3X2_F transform;
374 } D2D1_BRUSH_PROPERTIES;
376 typedef struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
378 D2D1_POINT_2F startPoint;
379 D2D1_POINT_2F endPoint;
380 } D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES;
382 typedef struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
384 D2D1_POINT_2F center;
385 D2D1_POINT_2F gradientOriginOffset;
386 float radiusX;
387 float radiusY;
388 } D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES;
390 typedef struct D2D1_LAYER_PARAMETERS
392 D2D1_RECT_F contentBounds;
393 ID2D1Geometry *geometricMask;
394 D2D1_ANTIALIAS_MODE maskAntialiasMode;
395 D2D1_MATRIX_3X2_F maskTransform;
396 float opacity;
397 ID2D1Brush *opacityBrush;
398 D2D1_LAYER_OPTIONS layerOptions;
399 } D2D1_LAYER_PARAMETERS;
401 typedef struct D2D1_RENDER_TARGET_PROPERTIES
403 D2D1_RENDER_TARGET_TYPE type;
404 D2D1_PIXEL_FORMAT pixelFormat;
405 float dpiX;
406 float dpiY;
407 D2D1_RENDER_TARGET_USAGE usage;
408 D2D1_FEATURE_LEVEL minLevel;
409 } D2D1_RENDER_TARGET_PROPERTIES;
411 typedef struct D2D1_STROKE_STYLE_PROPERTIES
413 D2D1_CAP_STYLE startCap;
414 D2D1_CAP_STYLE endCap;
415 D2D1_CAP_STYLE dashCap;
416 D2D1_LINE_JOIN lineJoin;
417 float miterLimit;
418 D2D1_DASH_STYLE dashStyle;
419 float dashOffset;
420 } D2D1_STROKE_STYLE_PROPERTIES;
422 typedef struct D2D1_HWND_RENDER_TARGET_PROPERTIES
424 HWND hwnd;
425 D2D1_SIZE_U pixelSize;
426 D2D1_PRESENT_OPTIONS presentOptions;
427 } D2D1_HWND_RENDER_TARGET_PROPERTIES;
430 local,
431 object,
432 uuid(2cd90691-12e2-11dc-9fed-001143a055f9)
434 interface ID2D1Resource : IUnknown
436 void GetFactory(
437 [out] ID2D1Factory **factory
442 local,
443 object,
444 uuid(2cd9069d-12e2-11dc-9fed-001143a055f9)
446 interface ID2D1StrokeStyle : ID2D1Resource
448 D2D1_CAP_STYLE GetStartCap();
449 D2D1_CAP_STYLE GetEndCap();
450 D2D1_CAP_STYLE GetDashCap();
451 float GetMiterLimit();
452 D2D1_LINE_JOIN GetLineJoin();
453 float GetDashOffset();
454 D2D1_DASH_STYLE GetDashStyle();
455 UINT32 GetDashesCount();
456 void GetDashes(
457 [out, size_is(count)] float *dashes,
458 [in] UINT32 count
463 local,
464 object,
465 uuid(2cd9069e-12e2-11dc-9fed-001143a055f9)
467 interface ID2D1SimplifiedGeometrySink : IUnknown
469 void SetFillMode(D2D1_FILL_MODE mode);
470 void SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags);
471 void BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin);
472 void AddLines(const D2D1_POINT_2F *points, UINT32 count);
473 void AddBeziers(const D2D1_BEZIER_SEGMENT *beziers, UINT32 count);
474 void EndFigure(D2D1_FIGURE_END figureEnd);
475 HRESULT Close();
479 local,
480 object,
481 uuid(2cd906c1-12e2-11dc-9fed-001143a055f9)
483 interface ID2D1TessellationSink : IUnknown
485 void AddTriangles(
486 [in, size_is(count)] const D2D1_TRIANGLE *triangles,
487 [in] UINT32 count
489 HRESULT Close();
493 local,
494 object,
495 uuid(2cd906a1-12e2-11dc-9fed-001143a055f9)
497 interface ID2D1Geometry : ID2D1Resource
499 HRESULT GetBounds(
500 [in] const D2D1_MATRIX_3X2_F *transform,
501 [out] D2D1_RECT_F *bounds
503 HRESULT GetWidenedBounds(
504 [in] float stroke_width,
505 [in] ID2D1StrokeStyle *stroke_style,
506 [in] const D2D1_MATRIX_3X2_F *transform,
507 [in] float tolerance,
508 [out] D2D1_RECT_F *bounds
510 HRESULT StrokeContainsPoint(
511 [in] D2D1_POINT_2F point,
512 [in] float stroke_width,
513 [in] ID2D1StrokeStyle *stroke_style,
514 [in] const D2D1_MATRIX_3X2_F *transform,
515 [in] float tolerance,
516 [out] BOOL *contains
518 HRESULT FillContainsPoint(
519 [in] D2D1_POINT_2F point,
520 [in] const D2D1_MATRIX_3X2_F *transform,
521 [in] float tolerance,
522 [out] BOOL *contains
524 HRESULT CompareWithGeometry(
525 [in] ID2D1Geometry *geometry,
526 [in] const D2D1_MATRIX_3X2_F *transform,
527 [in] float tolerance,
528 [out] D2D1_GEOMETRY_RELATION *relation
530 HRESULT Simplify(
531 [in] D2D1_GEOMETRY_SIMPLIFICATION_OPTION option,
532 [in] const D2D1_MATRIX_3X2_F *transform,
533 [in] float tolerance,
534 [in] ID2D1SimplifiedGeometrySink *sink
536 HRESULT Tessellate(
537 [in] const D2D1_MATRIX_3X2_F *transform,
538 [in] float tolerance,
539 [in] ID2D1TessellationSink *sink
541 HRESULT CombineWithGeometry(
542 [in] ID2D1Geometry *geometry,
543 [in] D2D1_COMBINE_MODE combine_mode,
544 [in] const D2D1_MATRIX_3X2_F *transform,
545 [in] float tolerance,
546 [in] ID2D1SimplifiedGeometrySink *sink
548 HRESULT Outline(
549 [in] const D2D1_MATRIX_3X2_F *transform,
550 [in] float tolerance,
551 [in] ID2D1SimplifiedGeometrySink *sink
553 HRESULT ComputeArea(
554 [in] const D2D1_MATRIX_3X2_F *transform,
555 [in] float tolerance,
556 [out] float *area
558 HRESULT ComputeLength(
559 [in] const D2D1_MATRIX_3X2_F *transform,
560 [in] float tolerance,
561 [out] float *length
563 HRESULT ComputePointAtLength(
564 [in] float length,
565 [in] const D2D1_MATRIX_3X2_F *transform,
566 [in] float tolerance,
567 [out] D2D1_POINT_2F *point,
568 [out] D2D1_POINT_2F *tangent
570 HRESULT Widen(
571 [in] float stroke_width,
572 [in] ID2D1StrokeStyle *stroke_style,
573 [in] const D2D1_MATRIX_3X2_F *transform,
574 [in] float tolerance,
575 [in] ID2D1SimplifiedGeometrySink *sink
580 local,
581 object,
582 uuid(2cd906a2-12e2-11dc-9fed-001143a055f9)
584 interface ID2D1RectangleGeometry : ID2D1Geometry
586 void GetRect(
587 [out] D2D1_RECT_F *rect
592 local,
593 object,
594 uuid(2cd906a3-12e2-11dc-9fed-001143a055f9)
596 interface ID2D1RoundedRectangleGeometry : ID2D1Geometry
598 void GetRoundedRect(
599 [out] D2D1_ROUNDED_RECT *rect
604 local,
605 object,
606 uuid(2cd906a4-12e2-11dc-9fed-001143a055f9)
608 interface ID2D1EllipseGeometry : ID2D1Geometry
610 void GetEllipse(
611 [out] D2D1_ELLIPSE *ellipse
616 local,
617 object,
618 uuid(2cd906a6-12e2-11dc-9fed-001143a055f9)
620 interface ID2D1GeometryGroup : ID2D1Geometry
622 D2D1_FILL_MODE GetFillMode();
623 UINT32 GetSourceGeometryCount();
624 void GetSourceGeometries(
625 [out, size_is(geometry_count)] ID2D1Geometry **geometry,
626 [in] UINT32 geometry_count
631 local,
632 object,
633 uuid(2cd906bb-12e2-11dc-9fed-001143a055f9)
635 interface ID2D1TransformedGeometry : ID2D1Geometry
637 void GetSourceGeometry(
638 [out] ID2D1Geometry **geometry
640 void GetTransform(
641 [out] D2D1_MATRIX_3X2_F *transform
646 local,
647 object,
648 uuid(2cd9069f-12e2-11dc-9fed-001143a055f9)
650 interface ID2D1GeometrySink : ID2D1SimplifiedGeometrySink
652 void AddLine(
653 [in] D2D1_POINT_2F point
655 void AddBezier(
656 [in] const D2D1_BEZIER_SEGMENT *bezier
658 void AddQuadraticBezier(
659 [in] const D2D1_QUADRATIC_BEZIER_SEGMENT *bezier
661 void AddQuadraticBeziers(
662 [in, size_is(bezier_count)] const D2D1_QUADRATIC_BEZIER_SEGMENT *beziers,
663 [in] UINT32 bezier_count
665 void AddArc(
666 [in] const D2D1_ARC_SEGMENT *arc
671 local,
672 object,
673 uuid(2cd906a5-12e2-11dc-9fed-001143a055f9)
675 interface ID2D1PathGeometry : ID2D1Geometry
677 HRESULT Open(
678 [out] ID2D1GeometrySink **sink
680 HRESULT Stream(
681 [in] ID2D1GeometrySink *sink
683 HRESULT GetSegmentCount(
684 [out] UINT32 *count
686 HRESULT GetFigureCount(
687 [out] UINT32 *count
692 local,
693 object,
694 uuid(28506e39-ebf6-46a1-bb47-fd85565ab957)
696 interface ID2D1DrawingStateBlock : ID2D1Resource
698 void GetDescription(
699 [out] D2D1_DRAWING_STATE_DESCRIPTION *desc
701 void SetDescription(
702 [in] const D2D1_DRAWING_STATE_DESCRIPTION *desc
704 void SetTextRenderingParams(
705 [in] IDWriteRenderingParams *text_rendering_params
707 void GetTextRenderingParams(
708 [out] IDWriteRenderingParams **text_rendering_params
713 local,
714 object,
715 uuid(65019f75-8da2-497c-b32c-dfa34e48ede6)
717 interface ID2D1Image : ID2D1Resource
722 local,
723 object,
724 uuid(a2296057-ea42-4099-983b-539fb6505426)
726 interface ID2D1Bitmap : ID2D1Image
728 D2D1_SIZE_F GetSize();
729 D2D1_SIZE_U GetPixelSize();
730 D2D1_PIXEL_FORMAT GetPixelFormat();
731 void GetDpi(
732 [out] float *dpi_x,
733 [out] float *dpi_y
735 HRESULT CopyFromBitmap(
736 [in] const D2D1_POINT_2U *dst_point,
737 [in] ID2D1Bitmap *bitmap,
738 [in] const D2D1_RECT_U *src_rect
740 HRESULT CopyFromRenderTarget(
741 [in] const D2D1_POINT_2U *dst_point,
742 [in] ID2D1RenderTarget *render_target,
743 [in] const D2D1_RECT_U *src_rect
745 HRESULT CopyFromMemory(
746 [in] const D2D1_RECT_U *dst_rect,
747 [in] const void *src_data,
748 [in] UINT32 pitch
753 local,
754 object,
755 uuid(2cd906a8-12e2-11dc-9fed-001143a055f9)
757 interface ID2D1Brush : ID2D1Resource
759 void SetOpacity(
760 [in] float opacity
762 void SetTransform(
763 [in] const D2D1_MATRIX_3X2_F *transform
765 float GetOpacity();
766 void GetTransform(
767 [out] D2D1_MATRIX_3X2_F *transform
772 local,
773 object,
774 uuid(2cd906aa-12e2-11dc-9fed-001143a055f9)
776 interface ID2D1BitmapBrush : ID2D1Brush
778 void SetExtendModeX(
779 [in] D2D1_EXTEND_MODE mode
781 void SetExtendModeY(
782 [in] D2D1_EXTEND_MODE mode
784 void SetInterpolationMode(
785 [in] D2D1_BITMAP_INTERPOLATION_MODE mode
787 void SetBitmap(
788 [in] ID2D1Bitmap *bitmap
790 D2D1_EXTEND_MODE GetExtendModeX();
791 D2D1_EXTEND_MODE GetExtendModeY();
792 D2D1_BITMAP_INTERPOLATION_MODE GetInterpolationMode();
793 void GetBitmap(
794 [out] ID2D1Bitmap **bitmap
799 local,
800 object,
801 uuid(2cd906a9-12e2-11dc-9fed-001143a055f9)
803 interface ID2D1SolidColorBrush : ID2D1Brush
805 void SetColor(
806 [in] const D2D1_COLOR_F *color
808 D2D1_COLOR_F GetColor();
812 local,
813 object,
814 uuid(2cd906a7-12e2-11dc-9fed-001143a055f9)
816 interface ID2D1GradientStopCollection : ID2D1Resource
818 UINT32 GetGradientStopCount();
819 void GetGradientStops(
820 [out] D2D1_GRADIENT_STOP *stops,
821 [in] UINT32 stop_count
823 D2D1_GAMMA GetColorInterpolationGamma();
824 D2D1_EXTEND_MODE GetExtendMode();
828 local,
829 object,
830 uuid(2cd906ab-12e2-11dc-9fed-001143a055f9)
832 interface ID2D1LinearGradientBrush : ID2D1Brush
834 void SetStartPoint(
835 [in] D2D1_POINT_2F start_point
837 void SetEndPoint(
838 [in] D2D1_POINT_2F end_point
840 D2D1_POINT_2F GetStartPoint();
841 D2D1_POINT_2F GetEndPoint();
842 void GetGradientStopCollection(
843 [out] ID2D1GradientStopCollection **gradient
848 local,
849 object,
850 uuid(2cd906ac-12e2-11dc-9fed-001143a055f9)
852 interface ID2D1RadialGradientBrush : ID2D1Brush
854 void SetCenter(
855 [in] D2D1_POINT_2F center
857 void SetGradientOriginOffset(
858 [in] D2D1_POINT_2F offset
860 void SetRadiusX(
861 [in] float radius
863 void SetRadiusY(
864 [in] float radius
866 D2D1_POINT_2F GetCenter();
867 D2D1_POINT_2F GetGradientOriginOffset();
868 float GetRadiusX();
869 float GetRadiusY();
870 void GetGradientStopCollection(
871 [out] ID2D1GradientStopCollection **gradient
876 local,
877 object,
878 uuid(2cd9069b-12e2-11dc-9fed-001143a055f9)
880 interface ID2D1Layer : ID2D1Resource
882 D2D1_SIZE_F GetSize();
886 local,
887 object,
888 uuid(2cd906c2-12e2-11dc-9fed-001143a055f9)
890 interface ID2D1Mesh : ID2D1Resource
892 HRESULT Open(
893 [out] ID2D1TessellationSink **sink
898 local,
899 object,
900 uuid(2cd90694-12e2-11dc-9fed-001143a055f9)
902 interface ID2D1RenderTarget : ID2D1Resource
904 HRESULT CreateBitmap(
905 [in] D2D1_SIZE_U size,
906 [in] const void *src_data,
907 [in] UINT32 pitch,
908 [in] const D2D1_BITMAP_PROPERTIES *desc,
909 [out] ID2D1Bitmap **bitmap
911 HRESULT CreateBitmapFromWicBitmap(
912 [in] IWICBitmapSource *bitmap_source,
913 [in] const D2D1_BITMAP_PROPERTIES *desc,
914 [out] ID2D1Bitmap **bitmap
916 HRESULT CreateSharedBitmap(
917 [in] REFIID iid,
918 [in, out] void *data,
919 [in] const D2D1_BITMAP_PROPERTIES *desc,
920 [out] ID2D1Bitmap **bitmap
922 HRESULT CreateBitmapBrush(
923 [in] ID2D1Bitmap *bitmap,
924 [in] const D2D1_BITMAP_BRUSH_PROPERTIES *bitmap_brush_desc,
925 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
926 [out] ID2D1BitmapBrush **brush
928 HRESULT CreateSolidColorBrush(
929 [in] const D2D1_COLOR_F *color,
930 [in] const D2D1_BRUSH_PROPERTIES *desc,
931 [out] ID2D1SolidColorBrush **brush
933 HRESULT CreateGradientStopCollection(
934 [in, size_is(stop_count)] const D2D1_GRADIENT_STOP *stops,
935 [in] UINT32 stop_count,
936 [in] D2D1_GAMMA gamma,
937 [in] D2D1_EXTEND_MODE extend_mode,
938 [out] ID2D1GradientStopCollection **gradient
940 HRESULT CreateLinearGradientBrush(
941 [in] const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc,
942 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
943 [in] ID2D1GradientStopCollection *gradient,
944 [out] ID2D1LinearGradientBrush **brush
946 HRESULT CreateRadialGradientBrush(
947 [in] const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc,
948 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
949 [in] ID2D1GradientStopCollection *gradient,
950 [out] ID2D1RadialGradientBrush **brush
952 HRESULT CreateCompatibleRenderTarget(
953 [in] const D2D1_SIZE_F *size,
954 [in] const D2D1_SIZE_U *pixel_size,
955 [in] const D2D1_PIXEL_FORMAT *format,
956 [in] D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options,
957 [out] ID2D1BitmapRenderTarget **render_target
959 HRESULT CreateLayer(
960 [in] const D2D1_SIZE_F *size,
961 [out] ID2D1Layer **layer
963 HRESULT CreateMesh(
964 [out] ID2D1Mesh **mesh
966 void DrawLine(
967 [in] D2D1_POINT_2F p0,
968 [in] D2D1_POINT_2F p1,
969 [in] ID2D1Brush *brush,
970 [in] float stroke_width,
971 [in] ID2D1StrokeStyle *stroke_style
973 void DrawRectangle(
974 [in] const D2D1_RECT_F *rect,
975 [in] ID2D1Brush *brush,
976 [in] float stroke_width,
977 [in] ID2D1StrokeStyle *stroke_style
979 void FillRectangle(
980 [in] const D2D1_RECT_F *rect,
981 [in] ID2D1Brush *brush
983 void DrawRoundedRectangle(
984 [in] const D2D1_ROUNDED_RECT *rect,
985 [in] ID2D1Brush *brush,
986 [in] float stroke_width,
987 [in] ID2D1StrokeStyle *stroke_style
989 void FillRoundedRectangle(
990 [in] const D2D1_ROUNDED_RECT *rect,
991 [in] ID2D1Brush *brush
993 void DrawEllipse(
994 [in] const D2D1_ELLIPSE *ellipse,
995 [in] ID2D1Brush *brush,
996 [in] float stroke_width,
997 [in] ID2D1StrokeStyle *stroke_style
999 void FillEllipse(
1000 [in] const D2D1_ELLIPSE *ellipse,
1001 [in] ID2D1Brush *brush
1003 void DrawGeometry(
1004 [in] ID2D1Geometry *geometry,
1005 [in] ID2D1Brush *brush,
1006 [in] float stroke_width,
1007 [in] ID2D1StrokeStyle *stroke_style
1009 void FillGeometry(
1010 [in] ID2D1Geometry *geometry,
1011 [in] ID2D1Brush *brush,
1012 [in] ID2D1Brush *opacity_brush
1014 void FillMesh(
1015 [in] ID2D1Mesh *mesh,
1016 [in] ID2D1Brush *brush
1018 void FillOpacityMask(
1019 [in] ID2D1Bitmap *mask,
1020 [in] ID2D1Brush *brush,
1021 [in] D2D1_OPACITY_MASK_CONTENT content,
1022 [in] const D2D1_RECT_F *dst_rect,
1023 [in] const D2D1_RECT_F *src_rect
1025 void DrawBitmap(
1026 [in] ID2D1Bitmap *bitmap,
1027 [in] const D2D1_RECT_F *dst_rect,
1028 [in] float opacity,
1029 [in] D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode,
1030 [in] const D2D1_RECT_F *src_rect
1032 void DrawText(
1033 [in, size_is(string_len)] const WCHAR *string,
1034 [in] UINT32 string_len,
1035 [in] IDWriteTextFormat *text_format,
1036 [in] const D2D1_RECT_F *layout_rect,
1037 [in] ID2D1Brush *brush,
1038 [in] D2D1_DRAW_TEXT_OPTIONS options,
1039 [in] DWRITE_MEASURING_MODE measuring_mode
1041 void DrawTextLayout(
1042 [in] D2D1_POINT_2F origin,
1043 [in] IDWriteTextLayout *layout,
1044 [in] ID2D1Brush *brush,
1045 [in] D2D1_DRAW_TEXT_OPTIONS options
1047 void DrawGlyphRun(
1048 [in] D2D1_POINT_2F baseline_origin,
1049 [in] const DWRITE_GLYPH_RUN *glyph_run,
1050 [in] ID2D1Brush *brush,
1051 [in] DWRITE_MEASURING_MODE measuring_mode
1053 void SetTransform(
1054 [in] const D2D1_MATRIX_3X2_F *transform
1056 void GetTransform(
1057 [out] D2D1_MATRIX_3X2_F *transform
1059 void SetAntialiasMode(
1060 [in] D2D1_ANTIALIAS_MODE antialias_mode
1062 D2D1_ANTIALIAS_MODE GetAntialiasMode();
1063 void SetTextAntialiasMode(
1064 [in] D2D1_TEXT_ANTIALIAS_MODE antialias_mode
1066 D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode();
1067 void SetTextRenderingParams(
1068 [in] IDWriteRenderingParams *text_rendering_params
1070 void GetTextRenderingParams(
1071 [out] IDWriteRenderingParams **text_rendering_params
1073 void SetTags(
1074 [in] D2D1_TAG tag1,
1075 [in] D2D1_TAG tag2
1077 void GetTags(
1078 [out] D2D1_TAG *tag1,
1079 [out] D2D1_TAG *tag2
1081 void PushLayer(
1082 [in] const D2D1_LAYER_PARAMETERS *layer_parameters,
1083 [in] ID2D1Layer *layer
1085 void PopLayer();
1086 HRESULT Flush(
1087 [out] D2D1_TAG *tag1,
1088 [out] D2D1_TAG *tag2
1090 void SaveDrawingState(
1091 [in, out] ID2D1DrawingStateBlock *state_block
1093 void RestoreDrawingState(
1094 [in] ID2D1DrawingStateBlock *state_block
1096 void PushAxisAlignedClip(
1097 [in] const D2D1_RECT_F *clip_rect,
1098 [in] D2D1_ANTIALIAS_MODE antialias_mode
1100 void PopAxisAlignedClip();
1101 void Clear(
1102 [in] const D2D1_COLOR_F *color
1104 void BeginDraw();
1105 HRESULT EndDraw(
1106 [out] D2D1_TAG *tag1,
1107 [out] D2D1_TAG *tag2
1109 D2D1_PIXEL_FORMAT GetPixelFormat();
1110 void SetDpi(
1111 [in] float dpi_x,
1112 [in] float dpi_y
1114 void GetDpi(
1115 [out] float *dpi_x,
1116 [out] float *dpi_y
1118 D2D1_SIZE_F GetSize();
1119 D2D1_SIZE_U GetPixelSize();
1120 UINT32 GetMaximumBitmapSize();
1121 BOOL IsSupported(
1122 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc
1127 local,
1128 object,
1129 uuid(2cd90695-12e2-11dc-9fed-001143a055f9)
1131 interface ID2D1BitmapRenderTarget : ID2D1RenderTarget
1133 HRESULT GetBitmap(
1134 [out] ID2D1Bitmap **bitmap
1139 local,
1140 object,
1141 uuid(2cd90698-12e2-11dc-9fed-001143a055f9)
1143 interface ID2D1HwndRenderTarget : ID2D1RenderTarget
1145 D2D1_WINDOW_STATE CheckWindowState();
1146 HRESULT Resize(
1147 [in] const D2D1_SIZE_U size
1149 HWND GetHwnd();
1153 local,
1154 object,
1155 uuid(1c51bc64-de61-46fd-9899-63a5d8f03950)
1157 interface ID2D1DCRenderTarget : ID2D1RenderTarget
1159 HRESULT BindDC(
1160 [in] const HDC dc,
1161 [in] const RECT *rect
1166 local,
1167 object,
1168 uuid(e0db51c3-6f77-4bae-b3d5-e47509b35838)
1170 interface ID2D1GdiInteropRenderTarget : IUnknown
1172 HRESULT GetDC(
1173 [in] D2D1_DC_INITIALIZE_MODE mode,
1174 [out] HDC *dc
1176 HRESULT ReleaseDC(
1177 [in] const RECT *update
1182 local,
1183 object,
1184 uuid(06152247-6f50-465a-9245-118bfd3b6007)
1186 interface ID2D1Factory : IUnknown
1188 HRESULT ReloadSystemMetrics();
1189 void GetDesktopDpi(
1190 [out] float *dpi_x,
1191 [out] float *dpi_y
1193 HRESULT CreateRectangleGeometry(
1194 [in] const D2D1_RECT_F *rect,
1195 [out] ID2D1RectangleGeometry **geometry
1197 HRESULT CreateRoundedRectangleGeometry(
1198 [in] const D2D1_ROUNDED_RECT *rect,
1199 [out] ID2D1RoundedRectangleGeometry **geometry
1201 HRESULT CreateEllipseGeometry(
1202 [in] const D2D1_ELLIPSE *ellipse,
1203 [out] ID2D1EllipseGeometry **geometry
1205 HRESULT CreateGeometryGroup(
1206 [in] D2D1_FILL_MODE fill_mode,
1207 [in, size_is(geometry_count)] ID2D1Geometry *geometry,
1208 [in] UINT32 geometry_count,
1209 [out] ID2D1GeometryGroup **group
1211 HRESULT CreateTransformedGeometry(
1212 [in] ID2D1Geometry *src_geometry,
1213 [in] const D2D1_MATRIX_3X2_F *transform,
1214 [out] ID2D1TransformedGeometry **transformed_geometry
1216 HRESULT CreatePathGeometry(
1217 [out] ID2D1PathGeometry **geometry
1219 HRESULT CreateStrokeStyle(
1220 [in] const D2D1_STROKE_STYLE_PROPERTIES *desc,
1221 [in, size_is(dash_count)] const float *dashes,
1222 [in] UINT32 dash_count,
1223 [out] ID2D1StrokeStyle **stroke_style
1225 HRESULT CreateDrawingStateBlock(
1226 [in] const D2D1_DRAWING_STATE_DESCRIPTION *desc,
1227 [in] IDWriteRenderingParams *text_rendering_params,
1228 [out] ID2D1DrawingStateBlock **state_block
1230 HRESULT CreateWicBitmapRenderTarget(
1231 [in] IWICBitmap *target,
1232 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1233 [out] ID2D1RenderTarget **render_target
1235 HRESULT CreateHwndRenderTarget(
1236 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1237 [in] const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwnd_rt_desc,
1238 [out] ID2D1HwndRenderTarget **render_target
1240 HRESULT CreateDxgiSurfaceRenderTarget(
1241 [in] IDXGISurface *surface,
1242 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1243 [out] ID2D1RenderTarget **render_target
1245 HRESULT CreateDCRenderTarget(
1246 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1247 [out] ID2D1DCRenderTarget **render_target
1251 [local] HRESULT __stdcall D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid,
1252 const D2D1_FACTORY_OPTIONS *factory_options, void **factory);
1253 [local] void __stdcall D2D1MakeRotateMatrix(float angle, D2D1_POINT_2F center, D2D1_MATRIX_3X2_F *matrix);