ddraw/tests: Get rid of struct tvertex.
[wine.git] / include / d2d1.idl
bloba6d0d367f495c36bd61dbfb9cbdd7e44dbafbe4c
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";
24 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
25 cpp_quote("#undef DrawText")
26 cpp_quote("#endif")
28 interface ID2D1Factory;
29 interface ID2D1RenderTarget;
30 interface ID2D1BitmapRenderTarget;
31 interface ID2D1Geometry;
32 interface ID2D1Brush;
33 interface IDWriteRenderingParams;
34 interface IDWriteTextFormat;
35 interface IDWriteTextLayout;
36 interface IWICBitmapSource;
37 interface IWICBitmap;
39 typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN;
41 typedef D2D_POINT_2F D2D1_POINT_2F;
42 typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F;
43 typedef D2D_RECT_F D2D1_RECT_F;
44 typedef D2D_SIZE_F D2D1_SIZE_F;
45 typedef UINT64 D2D1_TAG;
46 typedef D2D_SIZE_U D2D1_SIZE_U;
47 typedef D2D_POINT_2U D2D1_POINT_2U;
48 typedef D2D_RECT_U D2D1_RECT_U;
49 typedef D2D_COLOR_F D2D1_COLOR_F;
51 enum
53 D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR = 0,
54 D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR = 1,
55 D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC = 2,
56 D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR = 3,
57 D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC = 4,
58 D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC = 5,
59 D2D1_INTERPOLATION_MODE_DEFINITION_FANT = 6,
60 D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR = 7,
63 typedef enum D2D1_DEBUG_LEVEL
65 D2D1_DEBUG_LEVEL_NONE = 0,
66 D2D1_DEBUG_LEVEL_ERROR = 1,
67 D2D1_DEBUG_LEVEL_WARNING = 2,
68 D2D1_DEBUG_LEVEL_INFORMATION = 3,
69 D2D1_DEBUG_LEVEL_FORCE_DWORD = 0xffffffff,
70 } D2D1_DEBUG_LEVEL;
72 typedef enum D2D1_FACTORY_TYPE
74 D2D1_FACTORY_TYPE_SINGLE_THREADED = 0,
75 D2D1_FACTORY_TYPE_MULTI_THREADED = 1,
76 D2D1_FACTORY_TYPE_FORCE_DWORD = 0xfffffff,
77 } D2D1_FACTORY_TYPE;
79 typedef enum D2D1_FILL_MODE
81 D2D1_FILL_MODE_ALTERNATE = 0,
82 D2D1_FILL_MODE_WINDING = 1,
83 D2D1_FILL_MODE_FORCE_DWORD = 0xffffffff
84 } D2D1_FILL_MODE;
86 typedef enum D2D1_PATH_SEGMENT
88 D2D1_PATH_SEGMENT_NONE = 0,
89 D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 1,
90 D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 2,
91 D2D1_PATH_SEGMENT_FORCE_DWORD = 0xffffffff
92 } D2D1_PATH_SEGMENT;
94 typedef enum D2D1_FIGURE_BEGIN
96 D2D1_FIGURE_BEGIN_FILLED = 0,
97 D2D1_FIGURE_BEGIN_HOLLOW = 1,
98 D2D1_FIGURE_BEGIN_FORCE_DWORD = 0xffffffff
99 } D2D1_FIGURE_BEGIN;
101 typedef enum D2D1_FIGURE_END
103 D2D1_FIGURE_END_OPEN = 0,
104 D2D1_FIGURE_END_CLOSED = 1,
105 D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff
106 } D2D1_FIGURE_END;
108 typedef enum D2D1_CAP_STYLE
110 D2D1_CAP_STYLE_FLAT = 0,
111 D2D1_CAP_STYLE_SQUARE = 1,
112 D2D1_CAP_STYLE_ROUND = 2,
113 D2D1_CAP_STYLE_TRIANGLE = 3,
114 D2D1_CAP_STYLE_FORCE_DWORD = 0xffffffff,
115 } D2D1_CAP_STYLE;
117 typedef enum D2D1_LINE_JOIN
119 D2D1_LINE_JOIN_MITER = 0,
120 D2D1_LINE_JOIN_BEVEL = 1,
121 D2D1_LINE_JOIN_ROUND = 2,
122 D2D1_LINE_JOIN_MITER_OR_BEVEL = 3,
123 D2D1_LINE_JOIN_FORCE_DWORD = 0xffffffff,
124 } D2D1_LINE_JOIN;
126 typedef enum D2D1_DASH_STYLE
128 D2D1_DASH_STYLE_SOLID = 0,
129 D2D1_DASH_STYLE_DASH = 1,
130 D2D1_DASH_STYLE_DOT = 2,
131 D2D1_DASH_STYLE_DASH_DOT = 3,
132 D2D1_DASH_STYLE_DASH_DOT_DOT = 4,
133 D2D1_DASH_STYLE_CUSTOM = 5,
134 D2D1_DASH_STYLE_FORCE_DWORD = 0xffffffff,
135 } D2D1_DASH_STYLE;
137 typedef enum D2D1_GEOMETRY_RELATION
139 D2D1_GEOMETRY_RELATION_UNKNOWN = 0,
140 D2D1_GEOMETRY_RELATION_DISJOINT = 1,
141 D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2,
142 D2D1_GEOMETRY_RELATION_CONTAINS = 3,
143 D2D1_GEOMETRY_RELATION_OVERLAP = 4,
144 D2D1_GEOMETRY_RELATION_FORCE_DWORD = 0xffffffff,
145 } D2D1_GEOMETRY_RELATION;
147 typedef enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION
149 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0,
150 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1,
151 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_FORCE_DWORD = 0xffffffff,
152 } D2D1_GEOMETRY_SIMPLIFICATION_OPTION;
154 typedef enum D2D1_COMBINE_MODE
156 D2D1_COMBINE_MODE_UNION = 0,
157 D2D1_COMBINE_MODE_INTERSECT = 1,
158 D2D1_COMBINE_MODE_XOR = 2,
159 D2D1_COMBINE_MODE_EXCLUDE = 3,
160 D2D1_COMBINE_MODE_FORCE_DWORD = 0xffffffff,
161 } D2D1_COMBINE_MODE;
163 typedef enum D2D1_SWEEP_DIRECTION
165 D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0,
166 D2D1_SWEEP_DIRECTION_CLOCKWISE = 1,
167 D2D1_SWEEP_DIRECTION_FORCE_DWORD = 0xffffffff,
168 } D2D1_SWEEP_DIRECTION;
170 typedef enum D2D1_ARC_SIZE
172 D2D1_ARC_SIZE_SMALL = 0,
173 D2D1_ARC_SIZE_LARGE = 1,
174 D2D1_ARC_SIZE_FORCE_DWORD = 0xffffffff,
175 } D2D1_ARC_SIZE;
177 typedef enum D2D1_ANTIALIAS_MODE
179 D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0,
180 D2D1_ANTIALIAS_MODE_ALIASED = 1,
181 D2D1_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff,
182 } D2D1_ANTIALIAS_MODE;
184 typedef enum D2D1_TEXT_ANTIALIAS_MODE
186 D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0,
187 D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1,
188 D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2,
189 D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3,
190 D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff,
191 } D2D1_TEXT_ANTIALIAS_MODE;
193 typedef enum D2D1_EXTEND_MODE
195 D2D1_EXTEND_MODE_CLAMP = 0,
196 D2D1_EXTEND_MODE_WRAP = 1,
197 D2D1_EXTEND_MODE_MIRROR = 2,
198 D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff,
199 } D2D1_EXTEND_MODE;
201 typedef enum D2D1_BITMAP_INTERPOLATION_MODE
203 D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
204 D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
205 D2D1_BITMAP_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
206 } D2D1_BITMAP_INTERPOLATION_MODE;
208 typedef enum D2D1_GAMMA
210 D2D1_GAMMA_2_2 = 0,
211 D2D1_GAMMA_1_0 = 1,
212 D2D1_GAMMA_FORCE_DWORD = 0xffffffff,
213 } D2D1_GAMMA;
215 typedef enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS
217 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000,
218 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001,
219 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_FORCE_DWORD = 0xffffffff,
220 } D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS;
222 typedef enum D2D1_OPACITY_MASK_CONTENT
224 D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0,
225 D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1,
226 D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2,
227 D2D1_OPACITY_MASK_CONTENT_FORCE_DWORD = 0xffffffff,
228 } D2D1_OPACITY_MASK_CONTENT;
230 typedef enum D2D1_DRAW_TEXT_OPTIONS
232 D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001,
233 D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002,
234 D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000,
235 D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD = 0xffffffff,
236 } D2D1_DRAW_TEXT_OPTIONS;
238 typedef enum D2D1_LAYER_OPTIONS
240 D2D1_LAYER_OPTIONS_NONE = 0x00000000,
241 D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001,
242 D2D1_LAYER_OPTIONS_FORCE_DWORD = 0xffffffff,
243 } D2D1_LAYER_OPTIONS;
245 typedef enum D2D1_RENDER_TARGET_TYPE
247 D2D1_RENDER_TARGET_TYPE_DEFAULT = 0,
248 D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1,
249 D2D1_RENDER_TARGET_TYPE_HARDWARE = 2,
250 D2D1_RENDER_TARGET_TYPE_FORCE_DWORD = 0xffffffff,
251 } D2D1_RENDER_TARGET_TYPE;
253 typedef enum D2D1_RENDER_TARGET_USAGE
255 D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000,
256 D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001,
257 D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002,
258 D2D1_RENDER_TARGET_USAGE_FORCE_DWORD = 0xffffffff,
259 } D2D1_RENDER_TARGET_USAGE;
261 typedef enum D2D1_FEATURE_LEVEL
263 D2D1_FEATURE_LEVEL_DEFAULT = 0,
264 D2D1_FEATURE_LEVEL_9 = D3D_FEATURE_LEVEL_9_1,
265 D2D1_FEATURE_LEVEL_10 = D3D_FEATURE_LEVEL_10_0,
266 D2D1_FEATURE_LEVEL_FORCE_DWORD = 0xffffffff,
267 } D2D1_FEATURE_LEVEL;
269 typedef enum D2D1_WINDOW_STATE
271 D2D1_WINDOW_STATE_NONE = 0x0000000,
272 D2D1_WINDOW_STATE_OCCLUDED = 0x0000001,
273 D2D1_WINDOW_STATE_FORCE_DWORD = 0xffffffff,
274 } D2D1_WINDOW_STATE;
276 typedef enum D2D1_DC_INITIALIZE_MODE
278 D2D1_DC_INITIALIZE_MODE_COPY = 0,
279 D2D1_DC_INITIALIZE_MODE_CLEAR = 1,
280 D2D1_DC_INITIALIZE_MODE_FORCE_DWORD = 0xffffffff,
281 } D2D1_DC_INITIALIZE_MODE;
283 typedef enum D2D1_PRESENT_OPTIONS
285 D2D1_PRESENT_OPTIONS_NONE = 0x00000000,
286 D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001,
287 D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002,
288 D2D1_PRESENT_OPTIONS_FORCE_DWORD = 0xffffffff,
289 } D2D1_PRESENT_OPTIONS;
291 typedef struct D2D1_BEZIER_SEGMENT
293 D2D1_POINT_2F point1;
294 D2D1_POINT_2F point2;
295 D2D1_POINT_2F point3;
296 } D2D1_BEZIER_SEGMENT;
298 typedef struct D2D1_FACTORY_OPTIONS
300 D2D1_DEBUG_LEVEL debugLevel;
301 } D2D1_FACTORY_OPTIONS;
303 typedef struct D2D1_TRIANGLE
305 D2D1_POINT_2F point1;
306 D2D1_POINT_2F point2;
307 D2D1_POINT_2F point3;
308 } D2D1_TRIANGLE;
310 typedef struct D2D1_ROUNDED_RECT
312 D2D1_RECT_F rect;
313 float radiusX;
314 float radiusY;
315 } D2D1_ROUNDED_RECT;
317 typedef struct D2D1_ELLIPSE
319 D2D1_POINT_2F point;
320 float radiusX;
321 float radiusY;
322 } D2D1_ELLIPSE;
324 typedef struct D2D1_QUADRATIC_BEZIER_SEGMENT
326 D2D1_POINT_2F point1;
327 D2D1_POINT_2F point2;
328 } D2D1_QUADRATIC_BEZIER_SEGMENT;
330 typedef struct D2D1_ARC_SEGMENT
332 D2D1_POINT_2F point;
333 D2D1_SIZE_F size;
334 float rotationAngle;
335 D2D1_SWEEP_DIRECTION sweepDirection;
336 D2D1_ARC_SIZE arcSize;
337 } D2D1_ARC_SEGMENT;
339 typedef struct D2D1_DRAWING_STATE_DESCRIPTION
341 D2D1_ANTIALIAS_MODE antialiasMode;
342 D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
343 D2D1_TAG tag1;
344 D2D1_TAG tag2;
345 D2D1_MATRIX_3X2_F transform;
346 } D2D1_DRAWING_STATE_DESCRIPTION;
348 typedef struct D2D1_GRADIENT_STOP
350 float position;
351 D2D1_COLOR_F color;
352 } D2D1_GRADIENT_STOP;
354 typedef struct D2D1_BITMAP_PROPERTIES
356 D2D1_PIXEL_FORMAT pixelFormat;
357 float dpiX;
358 float dpiY;
359 } D2D1_BITMAP_PROPERTIES;
361 typedef struct D2D1_BITMAP_BRUSH_PROPERTIES
363 D2D1_EXTEND_MODE extendModeX;
364 D2D1_EXTEND_MODE extendModeY;
365 D2D1_BITMAP_INTERPOLATION_MODE interpolationMode;
366 } D2D1_BITMAP_BRUSH_PROPERTIES;
368 typedef struct D2D1_BRUSH_PROPERTIES
370 float opacity;
371 D2D1_MATRIX_3X2_F transform;
372 } D2D1_BRUSH_PROPERTIES;
374 typedef struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
376 D2D1_POINT_2F startPoint;
377 D2D1_POINT_2F endPoint;
378 } D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES;
380 typedef struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
382 D2D1_POINT_2F center;
383 D2D1_POINT_2F gradientOriginOffset;
384 float radiusX;
385 float radiusY;
386 } D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES;
388 typedef struct D2D1_LAYER_PARAMETERS
390 D2D1_RECT_F contentBounds;
391 ID2D1Geometry *geometricMask;
392 D2D1_ANTIALIAS_MODE maskAntialiasMode;
393 D2D1_MATRIX_3X2_F maskTransform;
394 float opacity;
395 ID2D1Brush *opacityBrush;
396 D2D1_LAYER_OPTIONS layerOptions;
397 } D2D1_LAYER_PARAMETERS;
399 typedef struct D2D1_RENDER_TARGET_PROPERTIES
401 D2D1_RENDER_TARGET_TYPE type;
402 D2D1_PIXEL_FORMAT pixelFormat;
403 float dpiX;
404 float dpiY;
405 D2D1_RENDER_TARGET_USAGE usage;
406 D2D1_FEATURE_LEVEL minLevel;
407 } D2D1_RENDER_TARGET_PROPERTIES;
409 typedef struct D2D1_STROKE_STYLE_PROPERTIES
411 D2D1_CAP_STYLE startCap;
412 D2D1_CAP_STYLE endCap;
413 D2D1_CAP_STYLE dashCap;
414 D2D1_LINE_JOIN lineJoin;
415 float miterLimit;
416 D2D1_DASH_STYLE dashStyle;
417 float dashOffset;
418 } D2D1_STROKE_STYLE_PROPERTIES;
420 typedef struct D2D1_HWND_RENDER_TARGET_PROPERTIES
422 HWND hwnd;
423 D2D1_SIZE_U pixelSize;
424 D2D1_PRESENT_OPTIONS presentOptions;
425 } D2D1_HWND_RENDER_TARGET_PROPERTIES;
428 local,
429 object,
430 uuid(2cd90691-12e2-11dc-9fed-001143a055f9)
432 interface ID2D1Resource : IUnknown
434 void GetFactory(
435 [out] ID2D1Factory **factory
440 local,
441 object,
442 uuid(2cd9069d-12e2-11dc-9fed-001143a055f9)
444 interface ID2D1StrokeStyle : ID2D1Resource
446 D2D1_CAP_STYLE GetStartCap();
447 D2D1_CAP_STYLE GetEndCap();
448 D2D1_CAP_STYLE GetDashCap();
449 float GetMiterLimit();
450 D2D1_LINE_JOIN GetLineJoin();
451 float GetDashOffset();
452 D2D1_DASH_STYLE GetDashStyle();
453 UINT32 GetDashesCount();
454 void GetDashes(
455 [out, size_is(count)] float *dashes,
456 [in] UINT32 count
461 local,
462 object,
463 uuid(2cd9069e-12e2-11dc-9fed-001143a055f9)
465 interface ID2D1SimplifiedGeometrySink : IUnknown
467 void SetFillMode(D2D1_FILL_MODE mode);
468 void SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags);
469 void BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin);
470 void AddLines(const D2D1_POINT_2F *points, UINT32 count);
471 void AddBeziers(const D2D1_BEZIER_SEGMENT *beziers, UINT32 count);
472 void EndFigure(D2D1_FIGURE_END figureEnd);
473 HRESULT Close();
477 local,
478 object,
479 uuid(2cd906c1-12e2-11dc-9fed-001143a055f9)
481 interface ID2D1TessellationSink : IUnknown
483 void AddTriangles(
484 [in, size_is(count)] const D2D1_TRIANGLE *triangles,
485 [in] UINT32 count
487 HRESULT Close();
491 local,
492 object,
493 uuid(2cd906a1-12e2-11dc-9fed-001143a055f9)
495 interface ID2D1Geometry : ID2D1Resource
497 HRESULT GetBounds(
498 [in] const D2D1_MATRIX_3X2_F *transform,
499 [out] D2D1_RECT_F *bounds
501 HRESULT GetWidenedBounds(
502 [in] float stroke_width,
503 [in] ID2D1StrokeStyle *stroke_style,
504 [in] const D2D1_MATRIX_3X2_F *transform,
505 [in] float tolerance,
506 [out] D2D1_RECT_F *bounds
508 HRESULT StrokeContainsPoint(
509 [in] D2D1_POINT_2F point,
510 [in] float stroke_width,
511 [in] ID2D1StrokeStyle *stroke_style,
512 [in] const D2D1_MATRIX_3X2_F *transform,
513 [in] float tolerance,
514 [out] BOOL *contains
516 HRESULT FillContainsPoint(
517 [in] D2D1_POINT_2F point,
518 [in] const D2D1_MATRIX_3X2_F *transform,
519 [in] float tolerance,
520 [out] BOOL *contains
522 HRESULT CompareWithGeometry(
523 [in] ID2D1Geometry *geometry,
524 [in] const D2D1_MATRIX_3X2_F *transform,
525 [in] float tolerance,
526 [out] D2D1_GEOMETRY_RELATION *relation
528 HRESULT Simplify(
529 [in] D2D1_GEOMETRY_SIMPLIFICATION_OPTION option,
530 [in] const D2D1_MATRIX_3X2_F *transform,
531 [in] float tolerance,
532 [in] ID2D1SimplifiedGeometrySink *sink
534 HRESULT Tessellate(
535 [in] const D2D1_MATRIX_3X2_F *transform,
536 [in] float tolerance,
537 [in] ID2D1TessellationSink *sink
539 HRESULT CombineWithGeometry(
540 [in] ID2D1Geometry *geometry,
541 [in] D2D1_COMBINE_MODE combine_mode,
542 [in] const D2D1_MATRIX_3X2_F *transform,
543 [in] float tolerance,
544 [in] ID2D1SimplifiedGeometrySink *sink
546 HRESULT Outline(
547 [in] const D2D1_MATRIX_3X2_F *transform,
548 [in] float tolerance,
549 [in] ID2D1SimplifiedGeometrySink *sink
551 HRESULT ComputeArea(
552 [in] const D2D1_MATRIX_3X2_F *transform,
553 [in] float tolerance,
554 [out] float *area
556 HRESULT ComputeLength(
557 [in] const D2D1_MATRIX_3X2_F *transform,
558 [in] float tolerance,
559 [out] float *length
561 HRESULT ComputePointAtLength(
562 [in] float length,
563 [in] const D2D1_MATRIX_3X2_F *transform,
564 [in] float tolerance,
565 [out] D2D1_POINT_2F *point,
566 [out] D2D1_POINT_2F *tangent
568 HRESULT Widen(
569 [in] float stroke_width,
570 [in] ID2D1StrokeStyle *stroke_style,
571 [in] const D2D1_MATRIX_3X2_F *transform,
572 [in] float tolerance,
573 [in] ID2D1SimplifiedGeometrySink *sink
578 local,
579 object,
580 uuid(2cd906a2-12e2-11dc-9fed-001143a055f9)
582 interface ID2D1RectangleGeometry : ID2D1Geometry
584 void GetRect(
585 [out] D2D1_RECT_F *rect
590 local,
591 object,
592 uuid(2cd906a3-12e2-11dc-9fed-001143a055f9)
594 interface ID2D1RoundedRectangleGeometry : ID2D1Geometry
596 void GetRoundedRect(
597 [out] D2D1_ROUNDED_RECT *rect
602 local,
603 object,
604 uuid(2cd906a4-12e2-11dc-9fed-001143a055f9)
606 interface ID2D1EllipseGeometry : ID2D1Geometry
608 void GetEllipse(
609 [out] D2D1_ELLIPSE *ellipse
614 local,
615 object,
616 uuid(2cd906a6-12e2-11dc-9fed-001143a055f9)
618 interface ID2D1GeometryGroup : ID2D1Geometry
620 D2D1_FILL_MODE GetFillMode();
621 UINT32 GetSourceGeometryCount();
622 void GetSourceGeometries(
623 [out, size_is(geometry_count)] ID2D1Geometry **geometry,
624 [in] UINT32 geometry_count
629 local,
630 object,
631 uuid(2cd906bb-12e2-11dc-9fed-001143a055f9)
633 interface ID2D1TransformedGeometry : ID2D1Geometry
635 void GetSourceGeometry(
636 [out] ID2D1Geometry **geometry
638 void GetTransform(
639 [out] D2D1_MATRIX_3X2_F *transform
644 local,
645 object,
646 uuid(2cd9069f-12e2-11dc-9fed-001143a055f9)
648 interface ID2D1GeometrySink : ID2D1SimplifiedGeometrySink
650 void AddLine(
651 [in] D2D1_POINT_2F point
653 void AddBezier(
654 [in] const D2D1_BEZIER_SEGMENT *bezier
656 void AddQuadraticBezier(
657 [in] const D2D1_QUADRATIC_BEZIER_SEGMENT *bezier
659 void AddQuadraticBeziers(
660 [in, size_is(bezier_count)] const D2D1_QUADRATIC_BEZIER_SEGMENT *beziers,
661 [in] UINT32 bezier_count
663 void AddArc(
664 [in] const D2D1_ARC_SEGMENT *arc
669 local,
670 object,
671 uuid(2cd906a5-12e2-11dc-9fed-001143a055f9)
673 interface ID2D1PathGeometry : ID2D1Geometry
675 HRESULT Open(
676 [out] ID2D1GeometrySink **sink
678 HRESULT Stream(
679 [in] ID2D1GeometrySink *sink
681 HRESULT GetSegmentCount(
682 [out] UINT32 *count
684 HRESULT GetFigureCount(
685 [out] UINT32 *count
690 local,
691 object,
692 uuid(28506e39-ebf6-46a1-bb47-fd85565ab957)
694 interface ID2D1DrawingStateBlock : ID2D1Resource
696 void GetDescription(
697 [out] D2D1_DRAWING_STATE_DESCRIPTION *desc
699 void SetDescription(
700 [in] const D2D1_DRAWING_STATE_DESCRIPTION *desc
702 void SetTextRenderingParams(
703 [in] IDWriteRenderingParams *text_rendering_params
705 void GetTextRenderingParams(
706 [out] IDWriteRenderingParams **text_rendering_params
711 local,
712 object,
713 uuid(65019f75-8da2-497c-b32c-dfa34e48ede6)
715 interface ID2D1Image : ID2D1Resource
720 local,
721 object,
722 uuid(a2296057-ea42-4099-983b-539fb6505426)
724 interface ID2D1Bitmap : ID2D1Image
726 D2D1_SIZE_F GetSize();
727 D2D1_SIZE_U GetPixelSize();
728 D2D1_PIXEL_FORMAT GetPixelFormat();
729 void GetDpi(
730 [out] float *dpi_x,
731 [out] float *dpi_y
733 HRESULT CopyFromBitmap(
734 [in] const D2D1_POINT_2U *dst_point,
735 [in] ID2D1Bitmap *bitmap,
736 [in] const D2D1_RECT_U *src_rect
738 HRESULT CopyFromRenderTarget(
739 [in] const D2D1_POINT_2U *dst_point,
740 [in] ID2D1RenderTarget *render_target,
741 [in] const D2D1_RECT_U *src_rect
743 HRESULT CopyFromMemory(
744 [in] const D2D1_RECT_U *dst_rect,
745 [in] const void *src_data,
746 [in] UINT32 pitch
751 local,
752 object,
753 uuid(2cd906a8-12e2-11dc-9fed-001143a055f9)
755 interface ID2D1Brush : ID2D1Resource
757 void SetOpacity(
758 [in] float opacity
760 void SetTransform(
761 [in] const D2D1_MATRIX_3X2_F *transform
763 float GetOpacity();
764 void GetTransform(
765 [out] D2D1_MATRIX_3X2_F *transform
770 local,
771 object,
772 uuid(2cd906aa-12e2-11dc-9fed-001143a055f9)
774 interface ID2D1BitmapBrush : ID2D1Brush
776 void SetExtendModeX(
777 [in] D2D1_EXTEND_MODE mode
779 void SetExtendModeY(
780 [in] D2D1_EXTEND_MODE mode
782 void SetInterpolationMode(
783 [in] D2D1_BITMAP_INTERPOLATION_MODE mode
785 void SetBitmap(
786 [in] ID2D1Bitmap *bitmap
788 D2D1_EXTEND_MODE GetExtendModeX();
789 D2D1_EXTEND_MODE GetExtendModeY();
790 D2D1_BITMAP_INTERPOLATION_MODE GetInterpolationMode();
791 void GetBitmap(
792 [out] ID2D1Bitmap **bitmap
797 local,
798 object,
799 uuid(2cd906a9-12e2-11dc-9fed-001143a055f9)
801 interface ID2D1SolidColorBrush : ID2D1Brush
803 void SetColor(
804 [in] const D2D1_COLOR_F *color
806 D2D1_COLOR_F GetColor();
810 local,
811 object,
812 uuid(2cd906a7-12e2-11dc-9fed-001143a055f9)
814 interface ID2D1GradientStopCollection : ID2D1Resource
816 UINT32 GetGradientStopCount();
817 void GetGradientStops(
818 [out] D2D1_GRADIENT_STOP *stops,
819 [in] UINT32 stop_count
821 D2D1_GAMMA GetColorInterpolationGamma();
822 D2D1_EXTEND_MODE GetExtendMode();
826 local,
827 object,
828 uuid(2cd906ab-12e2-11dc-9fed-001143a055f9)
830 interface ID2D1LinearGradientBrush : ID2D1Brush
832 void SetStartPoint(
833 [in] D2D1_POINT_2F start_point
835 void SetEndPoint(
836 [in] D2D1_POINT_2F end_point
838 D2D1_POINT_2F GetStartPoint();
839 D2D1_POINT_2F GetEndPoint();
840 void GetGradientStopCollection(
841 [out] ID2D1GradientStopCollection **gradient
846 local,
847 object,
848 uuid(2cd906ac-12e2-11dc-9fed-001143a055f9)
850 interface ID2D1RadialGradientBrush : ID2D1Brush
852 void SetCenter(
853 [in] D2D1_POINT_2F center
855 void SetGradientOriginOffset(
856 [in] D2D1_POINT_2F offset
858 void SetRadiusX(
859 [in] float radius
861 void SetRadiusY(
862 [in] float radius
864 D2D1_POINT_2F GetCenter();
865 D2D1_POINT_2F GetGradientOriginOffset();
866 float GetRadiusX();
867 float GetRadiusY();
868 void GetGradientStopCollection(
869 [out] ID2D1GradientStopCollection **gradient
874 local,
875 object,
876 uuid(2cd9069b-12e2-11dc-9fed-001143a055f9)
878 interface ID2D1Layer : ID2D1Resource
880 D2D1_SIZE_F GetSize();
884 local,
885 object,
886 uuid(2cd906c2-12e2-11dc-9fed-001143a055f9)
888 interface ID2D1Mesh : ID2D1Resource
890 HRESULT Open(
891 [out] ID2D1TessellationSink **sink
896 local,
897 object,
898 uuid(2cd90694-12e2-11dc-9fed-001143a055f9)
900 interface ID2D1RenderTarget : ID2D1Resource
902 HRESULT CreateBitmap(
903 [in] D2D1_SIZE_U size,
904 [in] const void *src_data,
905 [in] UINT32 pitch,
906 [in] const D2D1_BITMAP_PROPERTIES *desc,
907 [out] ID2D1Bitmap **bitmap
909 HRESULT CreateBitmapFromWicBitmap(
910 [in] IWICBitmapSource *bitmap_source,
911 [in] const D2D1_BITMAP_PROPERTIES *desc,
912 [out] ID2D1Bitmap **bitmap
914 HRESULT CreateSharedBitmap(
915 [in] REFIID iid,
916 [in, out] void *data,
917 [in] const D2D1_BITMAP_PROPERTIES *desc,
918 [out] ID2D1Bitmap **bitmap
920 HRESULT CreateBitmapBrush(
921 [in] ID2D1Bitmap *bitmap,
922 [in] const D2D1_BITMAP_BRUSH_PROPERTIES *bitmap_brush_desc,
923 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
924 [out] ID2D1BitmapBrush **brush
926 HRESULT CreateSolidColorBrush(
927 [in] const D2D1_COLOR_F *color,
928 [in] const D2D1_BRUSH_PROPERTIES *desc,
929 [out] ID2D1SolidColorBrush **brush
931 HRESULT CreateGradientStopCollection(
932 [in, size_is(stop_count)] const D2D1_GRADIENT_STOP *stops,
933 [in] UINT32 stop_count,
934 [in] D2D1_GAMMA gamma,
935 [in] D2D1_EXTEND_MODE extend_mode,
936 [out] ID2D1GradientStopCollection **gradient
938 HRESULT CreateLinearGradientBrush(
939 [in] const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc,
940 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
941 [in] ID2D1GradientStopCollection *gradient,
942 [out] ID2D1LinearGradientBrush **brush
944 HRESULT CreateRadialGradientBrush(
945 [in] const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc,
946 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
947 [in] ID2D1GradientStopCollection *gradient,
948 [out] ID2D1RadialGradientBrush **brush
950 HRESULT CreateCompatibleRenderTarget(
951 [in] const D2D1_SIZE_F *size,
952 [in] const D2D1_SIZE_U *pixel_size,
953 [in] const D2D1_PIXEL_FORMAT *format,
954 [in] D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options,
955 [out] ID2D1BitmapRenderTarget **render_target
957 HRESULT CreateLayer(
958 [in] const D2D1_SIZE_F *size,
959 [out] ID2D1Layer **layer
961 HRESULT CreateMesh(
962 [out] ID2D1Mesh **mesh
964 void DrawLine(
965 [in] D2D1_POINT_2F p0,
966 [in] D2D1_POINT_2F p1,
967 [in] ID2D1Brush *brush,
968 [in] float stroke_width,
969 [in] ID2D1StrokeStyle *stroke_style
971 void DrawRectangle(
972 [in] const D2D1_RECT_F *rect,
973 [in] ID2D1Brush *brush,
974 [in] float stroke_width,
975 [in] ID2D1StrokeStyle *stroke_style
977 void FillRectangle(
978 [in] const D2D1_RECT_F *rect,
979 [in] ID2D1Brush *brush
981 void DrawRoundedRectangle(
982 [in] const D2D1_ROUNDED_RECT *rect,
983 [in] ID2D1Brush *brush,
984 [in] float stroke_width,
985 [in] ID2D1StrokeStyle *stroke_style
987 void FillRoundedRectangle(
988 [in] const D2D1_ROUNDED_RECT *rect,
989 [in] ID2D1Brush *brush
991 void DrawEllipse(
992 [in] const D2D1_ELLIPSE *ellipse,
993 [in] ID2D1Brush *brush,
994 [in] float stroke_width,
995 [in] ID2D1StrokeStyle *stroke_style
997 void FillEllipse(
998 [in] const D2D1_ELLIPSE *ellipse,
999 [in] ID2D1Brush *brush
1001 void DrawGeometry(
1002 [in] ID2D1Geometry *geometry,
1003 [in] ID2D1Brush *brush,
1004 [in] float stroke_width,
1005 [in] ID2D1StrokeStyle *stroke_style
1007 void FillGeometry(
1008 [in] ID2D1Geometry *geometry,
1009 [in] ID2D1Brush *brush,
1010 [in] ID2D1Brush *opacity_brush
1012 void FillMesh(
1013 [in] ID2D1Mesh *mesh,
1014 [in] ID2D1Brush *brush
1016 void FillOpacityMask(
1017 [in] ID2D1Bitmap *mask,
1018 [in] ID2D1Brush *brush,
1019 [in] D2D1_OPACITY_MASK_CONTENT content,
1020 [in] const D2D1_RECT_F *dst_rect,
1021 [in] const D2D1_RECT_F *src_rect
1023 void DrawBitmap(
1024 [in] ID2D1Bitmap *bitmap,
1025 [in] const D2D1_RECT_F *dst_rect,
1026 [in] float opacity,
1027 [in] D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode,
1028 [in] const D2D1_RECT_F *src_rect
1030 void DrawText(
1031 [in, size_is(string_len)] const WCHAR *string,
1032 [in] UINT32 string_len,
1033 [in] IDWriteTextFormat *text_format,
1034 [in] const D2D1_RECT_F *layout_rect,
1035 [in] ID2D1Brush *brush,
1036 [in] D2D1_DRAW_TEXT_OPTIONS options,
1037 [in] DWRITE_MEASURING_MODE measuring_mode
1039 void DrawTextLayout(
1040 [in] D2D1_POINT_2F origin,
1041 [in] IDWriteTextLayout *layout,
1042 [in] ID2D1Brush *brush,
1043 [in] D2D1_DRAW_TEXT_OPTIONS options
1045 void DrawGlyphRun(
1046 [in] D2D1_POINT_2F baseline_origin,
1047 [in] const DWRITE_GLYPH_RUN *glyph_run,
1048 [in] ID2D1Brush *brush,
1049 [in] DWRITE_MEASURING_MODE measuring_mode
1051 void SetTransform(
1052 [in] const D2D1_MATRIX_3X2_F *transform
1054 void GetTransform(
1055 [out] D2D1_MATRIX_3X2_F *transform
1057 void SetAntialiasMode(
1058 [in] D2D1_ANTIALIAS_MODE antialias_mode
1060 D2D1_ANTIALIAS_MODE GetAntialiasMode();
1061 void SetTextAntialiasMode(
1062 [in] D2D1_TEXT_ANTIALIAS_MODE antialias_mode
1064 D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode();
1065 void SetTextRenderingParams(
1066 [in] IDWriteRenderingParams *text_rendering_params
1068 void GetTextRenderingParams(
1069 [out] IDWriteRenderingParams **text_rendering_params
1071 void SetTags(
1072 [in] D2D1_TAG tag1,
1073 [in] D2D1_TAG tag2
1075 void GetTags(
1076 [out] D2D1_TAG *tag1,
1077 [out] D2D1_TAG *tag2
1079 void PushLayer(
1080 [in] const D2D1_LAYER_PARAMETERS *layer_parameters,
1081 [in] ID2D1Layer *layer
1083 void PopLayer();
1084 HRESULT Flush(
1085 [out] D2D1_TAG *tag1,
1086 [out] D2D1_TAG *tag2
1088 void SaveDrawingState(
1089 [in, out] ID2D1DrawingStateBlock *state_block
1091 void RestoreDrawingState(
1092 [in] ID2D1DrawingStateBlock *state_block
1094 void PushAxisAlignedClip(
1095 [in] const D2D1_RECT_F *clip_rect,
1096 [in] D2D1_ANTIALIAS_MODE antialias_mode
1098 void PopAxisAlignedClip();
1099 void Clear(
1100 [in] const D2D1_COLOR_F *color
1102 void BeginDraw();
1103 HRESULT EndDraw(
1104 [out] D2D1_TAG *tag1,
1105 [out] D2D1_TAG *tag2
1107 D2D1_PIXEL_FORMAT GetPixelFormat();
1108 void SetDpi(
1109 [in] float dpi_x,
1110 [in] float dpi_y
1112 void GetDpi(
1113 [out] float *dpi_x,
1114 [out] float *dpi_y
1116 D2D1_SIZE_F GetSize();
1117 D2D1_SIZE_U GetPixelSize();
1118 UINT32 GetMaximumBitmapSize();
1119 BOOL IsSupported(
1120 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc
1125 local,
1126 object,
1127 uuid(2cd90695-12e2-11dc-9fed-001143a055f9)
1129 interface ID2D1BitmapRenderTarget : ID2D1RenderTarget
1131 HRESULT GetBitmap(
1132 [out] ID2D1Bitmap **bitmap
1137 local,
1138 object,
1139 uuid(2cd90698-12e2-11dc-9fed-001143a055f9)
1141 interface ID2D1HwndRenderTarget : ID2D1RenderTarget
1143 D2D1_WINDOW_STATE CheckWindowState();
1144 HRESULT Resize(
1145 [in] const D2D1_SIZE_U size
1147 HWND GetHwnd();
1151 local,
1152 object,
1153 uuid(1c51bc64-de61-46fd-9899-63a5d8f03950)
1155 interface ID2D1DCRenderTarget : ID2D1RenderTarget
1157 HRESULT BindDC(
1158 [in] const HDC dc,
1159 [in] const RECT rect
1164 local,
1165 object,
1166 uuid(e0db51c3-6f77-4bae-b3d5-e47509b35838)
1168 interface ID2D1GdiInteropRenderTarget : IUnknown
1170 HRESULT GetDC(
1171 [in] D2D1_DC_INITIALIZE_MODE mode,
1172 [out] HDC *dc
1174 HRESULT ReleaseDC(
1175 [in] const RECT *update
1180 local,
1181 object,
1182 uuid(06152247-6f50-465a-9245-118bfd3b6007)
1184 interface ID2D1Factory : IUnknown
1186 HRESULT ReloadSystemMetrics();
1187 void GetDesktopDpi(
1188 [out] float *dpi_x,
1189 [out] float *dpi_y
1191 HRESULT CreateRectangleGeometry(
1192 [in] const D2D1_RECT_F *rect,
1193 [out] ID2D1RectangleGeometry **geometry
1195 HRESULT CreateRoundedRectangleGeometry(
1196 [in] const D2D1_ROUNDED_RECT *rect,
1197 [out] ID2D1RoundedRectangleGeometry **geometry
1199 HRESULT CreateEllipseGeometry(
1200 [in] const D2D1_ELLIPSE *ellipse,
1201 [out] ID2D1EllipseGeometry **geometry
1203 HRESULT CreateGeometryGroup(
1204 [in] D2D1_FILL_MODE fill_mode,
1205 [in, size_is(geometry_count)] ID2D1Geometry *geometry,
1206 [in] UINT32 geometry_count,
1207 [out] ID2D1GeometryGroup **group
1209 HRESULT CreateTransformedGeometry(
1210 [in] ID2D1Geometry *src_geometry,
1211 [in] const D2D1_MATRIX_3X2_F *transform,
1212 [out] ID2D1TransformedGeometry **transformed_geometry
1214 HRESULT CreatePathGeometry(
1215 [out] ID2D1PathGeometry *geometry
1217 HRESULT CreateStrokeStyle(
1218 [in] const D2D1_STROKE_STYLE_PROPERTIES *desc,
1219 [in, size_is(dash_count)] const float *dashes,
1220 [in] UINT32 dash_count,
1221 [out] ID2D1StrokeStyle **stroke_style
1223 HRESULT CreateDrawingStateBlock(
1224 [in] const D2D1_DRAWING_STATE_DESCRIPTION *desc,
1225 [in] IDWriteRenderingParams *text_rendering_params,
1226 [out] ID2D1DrawingStateBlock **state_block
1228 HRESULT CreateWicBitmapRenderTarget(
1229 [in] IWICBitmap *target,
1230 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1231 [out] ID2D1RenderTarget **render_target
1233 HRESULT CreateHwndRenderTarget(
1234 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1235 [in] const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwnd_rt_desc,
1236 [out] ID2D1HwndRenderTarget **render_target
1238 HRESULT CreateDxgiSurfaceRenderTarget(
1239 [in] IDXGISurface *surface,
1240 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1241 [out] ID2D1RenderTarget **render_target
1243 HRESULT CreateDCRenderTarget(
1244 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1245 [out] ID2D1DCRenderTarget **render_target
1249 [local] HRESULT __stdcall D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid,
1250 const D2D1_FACTORY_OPTIONS *factory_options, void **factory);