include: Pack HID_DESCRIPTOR.
[wine/zf.git] / include / d2d1.idl
blob08487fa6b0fad36f2ba442234b0e6c617c336f7a
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.idl";
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 cpp_quote("#define D2D1_DEFAULT_FLATTENING_TOLERANCE (0.25f)")
55 enum
57 D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR = 0,
58 D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR = 1,
59 D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC = 2,
60 D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR = 3,
61 D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC = 4,
62 D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC = 5,
63 D2D1_INTERPOLATION_MODE_DEFINITION_FANT = 6,
64 D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR = 7,
67 typedef enum D2D1_DEBUG_LEVEL
69 D2D1_DEBUG_LEVEL_NONE = 0,
70 D2D1_DEBUG_LEVEL_ERROR = 1,
71 D2D1_DEBUG_LEVEL_WARNING = 2,
72 D2D1_DEBUG_LEVEL_INFORMATION = 3,
73 D2D1_DEBUG_LEVEL_FORCE_DWORD = 0xffffffff,
74 } D2D1_DEBUG_LEVEL;
76 typedef enum D2D1_FACTORY_TYPE
78 D2D1_FACTORY_TYPE_SINGLE_THREADED = 0,
79 D2D1_FACTORY_TYPE_MULTI_THREADED = 1,
80 D2D1_FACTORY_TYPE_FORCE_DWORD = 0xfffffff,
81 } D2D1_FACTORY_TYPE;
83 typedef enum D2D1_FILL_MODE
85 D2D1_FILL_MODE_ALTERNATE = 0,
86 D2D1_FILL_MODE_WINDING = 1,
87 D2D1_FILL_MODE_FORCE_DWORD = 0xffffffff
88 } D2D1_FILL_MODE;
90 typedef enum D2D1_PATH_SEGMENT
92 D2D1_PATH_SEGMENT_NONE = 0,
93 D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 1,
94 D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 2,
95 D2D1_PATH_SEGMENT_FORCE_DWORD = 0xffffffff
96 } D2D1_PATH_SEGMENT;
98 typedef enum D2D1_FIGURE_BEGIN
100 D2D1_FIGURE_BEGIN_FILLED = 0,
101 D2D1_FIGURE_BEGIN_HOLLOW = 1,
102 D2D1_FIGURE_BEGIN_FORCE_DWORD = 0xffffffff
103 } D2D1_FIGURE_BEGIN;
105 typedef enum D2D1_FIGURE_END
107 D2D1_FIGURE_END_OPEN = 0,
108 D2D1_FIGURE_END_CLOSED = 1,
109 D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff
110 } D2D1_FIGURE_END;
112 typedef enum D2D1_CAP_STYLE
114 D2D1_CAP_STYLE_FLAT = 0,
115 D2D1_CAP_STYLE_SQUARE = 1,
116 D2D1_CAP_STYLE_ROUND = 2,
117 D2D1_CAP_STYLE_TRIANGLE = 3,
118 D2D1_CAP_STYLE_FORCE_DWORD = 0xffffffff,
119 } D2D1_CAP_STYLE;
121 typedef enum D2D1_LINE_JOIN
123 D2D1_LINE_JOIN_MITER = 0,
124 D2D1_LINE_JOIN_BEVEL = 1,
125 D2D1_LINE_JOIN_ROUND = 2,
126 D2D1_LINE_JOIN_MITER_OR_BEVEL = 3,
127 D2D1_LINE_JOIN_FORCE_DWORD = 0xffffffff,
128 } D2D1_LINE_JOIN;
130 typedef enum D2D1_DASH_STYLE
132 D2D1_DASH_STYLE_SOLID = 0,
133 D2D1_DASH_STYLE_DASH = 1,
134 D2D1_DASH_STYLE_DOT = 2,
135 D2D1_DASH_STYLE_DASH_DOT = 3,
136 D2D1_DASH_STYLE_DASH_DOT_DOT = 4,
137 D2D1_DASH_STYLE_CUSTOM = 5,
138 D2D1_DASH_STYLE_FORCE_DWORD = 0xffffffff,
139 } D2D1_DASH_STYLE;
141 typedef enum D2D1_GEOMETRY_RELATION
143 D2D1_GEOMETRY_RELATION_UNKNOWN = 0,
144 D2D1_GEOMETRY_RELATION_DISJOINT = 1,
145 D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2,
146 D2D1_GEOMETRY_RELATION_CONTAINS = 3,
147 D2D1_GEOMETRY_RELATION_OVERLAP = 4,
148 D2D1_GEOMETRY_RELATION_FORCE_DWORD = 0xffffffff,
149 } D2D1_GEOMETRY_RELATION;
151 typedef enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION
153 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0,
154 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1,
155 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_FORCE_DWORD = 0xffffffff,
156 } D2D1_GEOMETRY_SIMPLIFICATION_OPTION;
158 typedef enum D2D1_COMBINE_MODE
160 D2D1_COMBINE_MODE_UNION = 0,
161 D2D1_COMBINE_MODE_INTERSECT = 1,
162 D2D1_COMBINE_MODE_XOR = 2,
163 D2D1_COMBINE_MODE_EXCLUDE = 3,
164 D2D1_COMBINE_MODE_FORCE_DWORD = 0xffffffff,
165 } D2D1_COMBINE_MODE;
167 typedef enum D2D1_SWEEP_DIRECTION
169 D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0,
170 D2D1_SWEEP_DIRECTION_CLOCKWISE = 1,
171 D2D1_SWEEP_DIRECTION_FORCE_DWORD = 0xffffffff,
172 } D2D1_SWEEP_DIRECTION;
174 typedef enum D2D1_ARC_SIZE
176 D2D1_ARC_SIZE_SMALL = 0,
177 D2D1_ARC_SIZE_LARGE = 1,
178 D2D1_ARC_SIZE_FORCE_DWORD = 0xffffffff,
179 } D2D1_ARC_SIZE;
181 typedef enum D2D1_ANTIALIAS_MODE
183 D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0,
184 D2D1_ANTIALIAS_MODE_ALIASED = 1,
185 D2D1_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff,
186 } D2D1_ANTIALIAS_MODE;
188 typedef enum D2D1_TEXT_ANTIALIAS_MODE
190 D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0,
191 D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1,
192 D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2,
193 D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3,
194 D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff,
195 } D2D1_TEXT_ANTIALIAS_MODE;
197 typedef enum D2D1_EXTEND_MODE
199 D2D1_EXTEND_MODE_CLAMP = 0,
200 D2D1_EXTEND_MODE_WRAP = 1,
201 D2D1_EXTEND_MODE_MIRROR = 2,
202 D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff,
203 } D2D1_EXTEND_MODE;
205 typedef enum D2D1_BITMAP_INTERPOLATION_MODE
207 D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
208 D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
209 D2D1_BITMAP_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
210 } D2D1_BITMAP_INTERPOLATION_MODE;
212 typedef enum D2D1_GAMMA
214 D2D1_GAMMA_2_2 = 0,
215 D2D1_GAMMA_1_0 = 1,
216 D2D1_GAMMA_FORCE_DWORD = 0xffffffff,
217 } D2D1_GAMMA;
219 typedef enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS
221 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000,
222 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001,
223 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_FORCE_DWORD = 0xffffffff,
224 } D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS;
226 typedef enum D2D1_OPACITY_MASK_CONTENT
228 D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0,
229 D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1,
230 D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2,
231 D2D1_OPACITY_MASK_CONTENT_FORCE_DWORD = 0xffffffff,
232 } D2D1_OPACITY_MASK_CONTENT;
234 typedef enum D2D1_DRAW_TEXT_OPTIONS
236 D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001,
237 D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002,
238 D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT = 0x00000004,
239 D2D1_DRAW_TEXT_OPTIONS_DISABLE_COLOR_BITMAP_SNAPPING = 0x00000008,
240 D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000,
241 D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD = 0xffffffff,
242 } D2D1_DRAW_TEXT_OPTIONS;
244 typedef enum D2D1_LAYER_OPTIONS
246 D2D1_LAYER_OPTIONS_NONE = 0x00000000,
247 D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001,
248 D2D1_LAYER_OPTIONS_FORCE_DWORD = 0xffffffff,
249 } D2D1_LAYER_OPTIONS;
251 typedef enum D2D1_RENDER_TARGET_TYPE
253 D2D1_RENDER_TARGET_TYPE_DEFAULT = 0,
254 D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1,
255 D2D1_RENDER_TARGET_TYPE_HARDWARE = 2,
256 D2D1_RENDER_TARGET_TYPE_FORCE_DWORD = 0xffffffff,
257 } D2D1_RENDER_TARGET_TYPE;
259 typedef enum D2D1_RENDER_TARGET_USAGE
261 D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000,
262 D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001,
263 D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002,
264 D2D1_RENDER_TARGET_USAGE_FORCE_DWORD = 0xffffffff,
265 } D2D1_RENDER_TARGET_USAGE;
267 typedef enum D2D1_FEATURE_LEVEL
269 D2D1_FEATURE_LEVEL_DEFAULT = 0,
270 D2D1_FEATURE_LEVEL_9 = D3D_FEATURE_LEVEL_9_1,
271 D2D1_FEATURE_LEVEL_10 = D3D_FEATURE_LEVEL_10_0,
272 D2D1_FEATURE_LEVEL_FORCE_DWORD = 0xffffffff,
273 } D2D1_FEATURE_LEVEL;
275 typedef enum D2D1_WINDOW_STATE
277 D2D1_WINDOW_STATE_NONE = 0,
278 D2D1_WINDOW_STATE_OCCLUDED = 1,
279 D2D1_WINDOW_STATE_FORCE_DWORD = 0xffffffff,
280 } D2D1_WINDOW_STATE;
282 typedef enum D2D1_DC_INITIALIZE_MODE
284 D2D1_DC_INITIALIZE_MODE_COPY = 0,
285 D2D1_DC_INITIALIZE_MODE_CLEAR = 1,
286 D2D1_DC_INITIALIZE_MODE_FORCE_DWORD = 0xffffffff,
287 } D2D1_DC_INITIALIZE_MODE;
289 typedef enum D2D1_PRESENT_OPTIONS
291 D2D1_PRESENT_OPTIONS_NONE = 0x00000000,
292 D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001,
293 D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002,
294 D2D1_PRESENT_OPTIONS_FORCE_DWORD = 0xffffffff,
295 } D2D1_PRESENT_OPTIONS;
297 typedef struct D2D1_BEZIER_SEGMENT
299 D2D1_POINT_2F point1;
300 D2D1_POINT_2F point2;
301 D2D1_POINT_2F point3;
302 } D2D1_BEZIER_SEGMENT;
304 typedef struct D2D1_FACTORY_OPTIONS
306 D2D1_DEBUG_LEVEL debugLevel;
307 } D2D1_FACTORY_OPTIONS;
309 typedef struct D2D1_TRIANGLE
311 D2D1_POINT_2F point1;
312 D2D1_POINT_2F point2;
313 D2D1_POINT_2F point3;
314 } D2D1_TRIANGLE;
316 typedef struct D2D1_ROUNDED_RECT
318 D2D1_RECT_F rect;
319 float radiusX;
320 float radiusY;
321 } D2D1_ROUNDED_RECT;
323 typedef struct D2D1_ELLIPSE
325 D2D1_POINT_2F point;
326 float radiusX;
327 float radiusY;
328 } D2D1_ELLIPSE;
330 typedef struct D2D1_QUADRATIC_BEZIER_SEGMENT
332 D2D1_POINT_2F point1;
333 D2D1_POINT_2F point2;
334 } D2D1_QUADRATIC_BEZIER_SEGMENT;
336 typedef struct D2D1_ARC_SEGMENT
338 D2D1_POINT_2F point;
339 D2D1_SIZE_F size;
340 float rotationAngle;
341 D2D1_SWEEP_DIRECTION sweepDirection;
342 D2D1_ARC_SIZE arcSize;
343 } D2D1_ARC_SEGMENT;
345 typedef struct D2D1_DRAWING_STATE_DESCRIPTION
347 D2D1_ANTIALIAS_MODE antialiasMode;
348 D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
349 D2D1_TAG tag1;
350 D2D1_TAG tag2;
351 D2D1_MATRIX_3X2_F transform;
352 } D2D1_DRAWING_STATE_DESCRIPTION;
354 typedef struct D2D1_GRADIENT_STOP
356 float position;
357 D2D1_COLOR_F color;
358 } D2D1_GRADIENT_STOP;
360 typedef struct D2D1_BITMAP_PROPERTIES
362 D2D1_PIXEL_FORMAT pixelFormat;
363 float dpiX;
364 float dpiY;
365 } D2D1_BITMAP_PROPERTIES;
367 typedef struct D2D1_BITMAP_BRUSH_PROPERTIES
369 D2D1_EXTEND_MODE extendModeX;
370 D2D1_EXTEND_MODE extendModeY;
371 D2D1_BITMAP_INTERPOLATION_MODE interpolationMode;
372 } D2D1_BITMAP_BRUSH_PROPERTIES;
374 typedef struct D2D1_BRUSH_PROPERTIES
376 float opacity;
377 D2D1_MATRIX_3X2_F transform;
378 } D2D1_BRUSH_PROPERTIES;
380 typedef struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
382 D2D1_POINT_2F startPoint;
383 D2D1_POINT_2F endPoint;
384 } D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES;
386 typedef struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
388 D2D1_POINT_2F center;
389 D2D1_POINT_2F gradientOriginOffset;
390 float radiusX;
391 float radiusY;
392 } D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES;
394 typedef struct D2D1_LAYER_PARAMETERS
396 D2D1_RECT_F contentBounds;
397 ID2D1Geometry *geometricMask;
398 D2D1_ANTIALIAS_MODE maskAntialiasMode;
399 D2D1_MATRIX_3X2_F maskTransform;
400 float opacity;
401 ID2D1Brush *opacityBrush;
402 D2D1_LAYER_OPTIONS layerOptions;
403 } D2D1_LAYER_PARAMETERS;
405 typedef struct D2D1_RENDER_TARGET_PROPERTIES
407 D2D1_RENDER_TARGET_TYPE type;
408 D2D1_PIXEL_FORMAT pixelFormat;
409 float dpiX;
410 float dpiY;
411 D2D1_RENDER_TARGET_USAGE usage;
412 D2D1_FEATURE_LEVEL minLevel;
413 } D2D1_RENDER_TARGET_PROPERTIES;
415 typedef struct D2D1_STROKE_STYLE_PROPERTIES
417 D2D1_CAP_STYLE startCap;
418 D2D1_CAP_STYLE endCap;
419 D2D1_CAP_STYLE dashCap;
420 D2D1_LINE_JOIN lineJoin;
421 float miterLimit;
422 D2D1_DASH_STYLE dashStyle;
423 float dashOffset;
424 } D2D1_STROKE_STYLE_PROPERTIES;
426 typedef struct D2D1_HWND_RENDER_TARGET_PROPERTIES
428 HWND hwnd;
429 D2D1_SIZE_U pixelSize;
430 D2D1_PRESENT_OPTIONS presentOptions;
431 } D2D1_HWND_RENDER_TARGET_PROPERTIES;
434 local,
435 object,
436 uuid(2cd90691-12e2-11dc-9fed-001143a055f9)
438 interface ID2D1Resource : IUnknown
440 void GetFactory(
441 [out] ID2D1Factory **factory
446 local,
447 object,
448 uuid(2cd9069d-12e2-11dc-9fed-001143a055f9)
450 interface ID2D1StrokeStyle : ID2D1Resource
452 D2D1_CAP_STYLE GetStartCap();
453 D2D1_CAP_STYLE GetEndCap();
454 D2D1_CAP_STYLE GetDashCap();
455 float GetMiterLimit();
456 D2D1_LINE_JOIN GetLineJoin();
457 float GetDashOffset();
458 D2D1_DASH_STYLE GetDashStyle();
459 UINT32 GetDashesCount();
460 void GetDashes(
461 [out, size_is(count)] float *dashes,
462 [in] UINT32 count
467 local,
468 object,
469 uuid(2cd9069e-12e2-11dc-9fed-001143a055f9)
471 interface ID2D1SimplifiedGeometrySink : IUnknown
473 void SetFillMode(D2D1_FILL_MODE mode);
474 void SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags);
475 void BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin);
476 void AddLines(const D2D1_POINT_2F *points, UINT32 count);
477 void AddBeziers(const D2D1_BEZIER_SEGMENT *beziers, UINT32 count);
478 void EndFigure(D2D1_FIGURE_END figureEnd);
479 HRESULT Close();
483 local,
484 object,
485 uuid(2cd906c1-12e2-11dc-9fed-001143a055f9)
487 interface ID2D1TessellationSink : IUnknown
489 void AddTriangles(
490 [in, size_is(count)] const D2D1_TRIANGLE *triangles,
491 [in] UINT32 count
493 HRESULT Close();
497 local,
498 object,
499 uuid(2cd906a1-12e2-11dc-9fed-001143a055f9)
501 interface ID2D1Geometry : ID2D1Resource
503 HRESULT GetBounds(
504 [in] const D2D1_MATRIX_3X2_F *transform,
505 [out] D2D1_RECT_F *bounds
507 HRESULT GetWidenedBounds(
508 [in] float stroke_width,
509 [in] ID2D1StrokeStyle *stroke_style,
510 [in] const D2D1_MATRIX_3X2_F *transform,
511 [in] float tolerance,
512 [out] D2D1_RECT_F *bounds
514 HRESULT StrokeContainsPoint(
515 [in] D2D1_POINT_2F point,
516 [in] float stroke_width,
517 [in] ID2D1StrokeStyle *stroke_style,
518 [in] const D2D1_MATRIX_3X2_F *transform,
519 [in] float tolerance,
520 [out] BOOL *contains
522 HRESULT FillContainsPoint(
523 [in] D2D1_POINT_2F point,
524 [in] const D2D1_MATRIX_3X2_F *transform,
525 [in] float tolerance,
526 [out] BOOL *contains
528 HRESULT CompareWithGeometry(
529 [in] ID2D1Geometry *geometry,
530 [in] const D2D1_MATRIX_3X2_F *transform,
531 [in] float tolerance,
532 [out] D2D1_GEOMETRY_RELATION *relation
534 HRESULT Simplify(
535 [in] D2D1_GEOMETRY_SIMPLIFICATION_OPTION option,
536 [in] const D2D1_MATRIX_3X2_F *transform,
537 [in] float tolerance,
538 [in] ID2D1SimplifiedGeometrySink *sink
540 HRESULT Tessellate(
541 [in] const D2D1_MATRIX_3X2_F *transform,
542 [in] float tolerance,
543 [in] ID2D1TessellationSink *sink
545 HRESULT CombineWithGeometry(
546 [in] ID2D1Geometry *geometry,
547 [in] D2D1_COMBINE_MODE combine_mode,
548 [in] const D2D1_MATRIX_3X2_F *transform,
549 [in] float tolerance,
550 [in] ID2D1SimplifiedGeometrySink *sink
552 HRESULT Outline(
553 [in] const D2D1_MATRIX_3X2_F *transform,
554 [in] float tolerance,
555 [in] ID2D1SimplifiedGeometrySink *sink
557 HRESULT ComputeArea(
558 [in] const D2D1_MATRIX_3X2_F *transform,
559 [in] float tolerance,
560 [out] float *area
562 HRESULT ComputeLength(
563 [in] const D2D1_MATRIX_3X2_F *transform,
564 [in] float tolerance,
565 [out] float *length
567 HRESULT ComputePointAtLength(
568 [in] float length,
569 [in] const D2D1_MATRIX_3X2_F *transform,
570 [in] float tolerance,
571 [out] D2D1_POINT_2F *point,
572 [out] D2D1_POINT_2F *tangent
574 HRESULT Widen(
575 [in] float stroke_width,
576 [in] ID2D1StrokeStyle *stroke_style,
577 [in] const D2D1_MATRIX_3X2_F *transform,
578 [in] float tolerance,
579 [in] ID2D1SimplifiedGeometrySink *sink
584 local,
585 object,
586 uuid(2cd906a2-12e2-11dc-9fed-001143a055f9)
588 interface ID2D1RectangleGeometry : ID2D1Geometry
590 void GetRect(
591 [out] D2D1_RECT_F *rect
596 local,
597 object,
598 uuid(2cd906a3-12e2-11dc-9fed-001143a055f9)
600 interface ID2D1RoundedRectangleGeometry : ID2D1Geometry
602 void GetRoundedRect(
603 [out] D2D1_ROUNDED_RECT *rect
608 local,
609 object,
610 uuid(2cd906a4-12e2-11dc-9fed-001143a055f9)
612 interface ID2D1EllipseGeometry : ID2D1Geometry
614 void GetEllipse(
615 [out] D2D1_ELLIPSE *ellipse
620 local,
621 object,
622 uuid(2cd906a6-12e2-11dc-9fed-001143a055f9)
624 interface ID2D1GeometryGroup : ID2D1Geometry
626 D2D1_FILL_MODE GetFillMode();
627 UINT32 GetSourceGeometryCount();
628 void GetSourceGeometries(
629 [out, size_is(geometry_count)] ID2D1Geometry **geometry,
630 [in] UINT32 geometry_count
635 local,
636 object,
637 uuid(2cd906bb-12e2-11dc-9fed-001143a055f9)
639 interface ID2D1TransformedGeometry : ID2D1Geometry
641 void GetSourceGeometry(
642 [out] ID2D1Geometry **geometry
644 void GetTransform(
645 [out] D2D1_MATRIX_3X2_F *transform
650 local,
651 object,
652 uuid(2cd9069f-12e2-11dc-9fed-001143a055f9)
654 interface ID2D1GeometrySink : ID2D1SimplifiedGeometrySink
656 void AddLine(
657 [in] D2D1_POINT_2F point
659 void AddBezier(
660 [in] const D2D1_BEZIER_SEGMENT *bezier
662 void AddQuadraticBezier(
663 [in] const D2D1_QUADRATIC_BEZIER_SEGMENT *bezier
665 void AddQuadraticBeziers(
666 [in, size_is(bezier_count)] const D2D1_QUADRATIC_BEZIER_SEGMENT *beziers,
667 [in] UINT32 bezier_count
669 void AddArc(
670 [in] const D2D1_ARC_SEGMENT *arc
675 local,
676 object,
677 uuid(2cd906a5-12e2-11dc-9fed-001143a055f9)
679 interface ID2D1PathGeometry : ID2D1Geometry
681 HRESULT Open(
682 [out] ID2D1GeometrySink **sink
684 HRESULT Stream(
685 [in] ID2D1GeometrySink *sink
687 HRESULT GetSegmentCount(
688 [out] UINT32 *count
690 HRESULT GetFigureCount(
691 [out] UINT32 *count
696 local,
697 object,
698 uuid(28506e39-ebf6-46a1-bb47-fd85565ab957)
700 interface ID2D1DrawingStateBlock : ID2D1Resource
702 void GetDescription(
703 [out] D2D1_DRAWING_STATE_DESCRIPTION *desc
705 void SetDescription(
706 [in] const D2D1_DRAWING_STATE_DESCRIPTION *desc
708 void SetTextRenderingParams(
709 [in] IDWriteRenderingParams *text_rendering_params
711 void GetTextRenderingParams(
712 [out] IDWriteRenderingParams **text_rendering_params
717 local,
718 object,
719 uuid(65019f75-8da2-497c-b32c-dfa34e48ede6)
721 interface ID2D1Image : ID2D1Resource
726 local,
727 object,
728 uuid(a2296057-ea42-4099-983b-539fb6505426)
730 interface ID2D1Bitmap : ID2D1Image
732 D2D1_SIZE_F GetSize();
733 D2D1_SIZE_U GetPixelSize();
734 D2D1_PIXEL_FORMAT GetPixelFormat();
735 void GetDpi(
736 [out] float *dpi_x,
737 [out] float *dpi_y
739 HRESULT CopyFromBitmap(
740 [in] const D2D1_POINT_2U *dst_point,
741 [in] ID2D1Bitmap *bitmap,
742 [in] const D2D1_RECT_U *src_rect
744 HRESULT CopyFromRenderTarget(
745 [in] const D2D1_POINT_2U *dst_point,
746 [in] ID2D1RenderTarget *render_target,
747 [in] const D2D1_RECT_U *src_rect
749 HRESULT CopyFromMemory(
750 [in] const D2D1_RECT_U *dst_rect,
751 [in] const void *src_data,
752 [in] UINT32 pitch
757 local,
758 object,
759 uuid(2cd906a8-12e2-11dc-9fed-001143a055f9)
761 interface ID2D1Brush : ID2D1Resource
763 void SetOpacity(
764 [in] float opacity
766 void SetTransform(
767 [in] const D2D1_MATRIX_3X2_F *transform
769 float GetOpacity();
770 void GetTransform(
771 [out] D2D1_MATRIX_3X2_F *transform
776 local,
777 object,
778 uuid(2cd906aa-12e2-11dc-9fed-001143a055f9)
780 interface ID2D1BitmapBrush : ID2D1Brush
782 void SetExtendModeX(
783 [in] D2D1_EXTEND_MODE mode
785 void SetExtendModeY(
786 [in] D2D1_EXTEND_MODE mode
788 void SetInterpolationMode(
789 [in] D2D1_BITMAP_INTERPOLATION_MODE mode
791 void SetBitmap(
792 [in] ID2D1Bitmap *bitmap
794 D2D1_EXTEND_MODE GetExtendModeX();
795 D2D1_EXTEND_MODE GetExtendModeY();
796 D2D1_BITMAP_INTERPOLATION_MODE GetInterpolationMode();
797 void GetBitmap(
798 [out] ID2D1Bitmap **bitmap
803 local,
804 object,
805 uuid(2cd906a9-12e2-11dc-9fed-001143a055f9)
807 interface ID2D1SolidColorBrush : ID2D1Brush
809 void SetColor(
810 [in] const D2D1_COLOR_F *color
812 D2D1_COLOR_F GetColor();
816 local,
817 object,
818 uuid(2cd906a7-12e2-11dc-9fed-001143a055f9)
820 interface ID2D1GradientStopCollection : ID2D1Resource
822 UINT32 GetGradientStopCount();
823 void GetGradientStops(
824 [out] D2D1_GRADIENT_STOP *stops,
825 [in] UINT32 stop_count
827 D2D1_GAMMA GetColorInterpolationGamma();
828 D2D1_EXTEND_MODE GetExtendMode();
832 local,
833 object,
834 uuid(2cd906ab-12e2-11dc-9fed-001143a055f9)
836 interface ID2D1LinearGradientBrush : ID2D1Brush
838 void SetStartPoint(
839 [in] D2D1_POINT_2F start_point
841 void SetEndPoint(
842 [in] D2D1_POINT_2F end_point
844 D2D1_POINT_2F GetStartPoint();
845 D2D1_POINT_2F GetEndPoint();
846 void GetGradientStopCollection(
847 [out] ID2D1GradientStopCollection **gradient
852 local,
853 object,
854 uuid(2cd906ac-12e2-11dc-9fed-001143a055f9)
856 interface ID2D1RadialGradientBrush : ID2D1Brush
858 void SetCenter(
859 [in] D2D1_POINT_2F center
861 void SetGradientOriginOffset(
862 [in] D2D1_POINT_2F offset
864 void SetRadiusX(
865 [in] float radius
867 void SetRadiusY(
868 [in] float radius
870 D2D1_POINT_2F GetCenter();
871 D2D1_POINT_2F GetGradientOriginOffset();
872 float GetRadiusX();
873 float GetRadiusY();
874 void GetGradientStopCollection(
875 [out] ID2D1GradientStopCollection **gradient
880 local,
881 object,
882 uuid(2cd9069b-12e2-11dc-9fed-001143a055f9)
884 interface ID2D1Layer : ID2D1Resource
886 D2D1_SIZE_F GetSize();
890 local,
891 object,
892 uuid(2cd906c2-12e2-11dc-9fed-001143a055f9)
894 interface ID2D1Mesh : ID2D1Resource
896 HRESULT Open(
897 [out] ID2D1TessellationSink **sink
902 local,
903 object,
904 uuid(2cd90694-12e2-11dc-9fed-001143a055f9)
906 interface ID2D1RenderTarget : ID2D1Resource
908 HRESULT CreateBitmap(
909 [in] D2D1_SIZE_U size,
910 [in] const void *src_data,
911 [in] UINT32 pitch,
912 [in] const D2D1_BITMAP_PROPERTIES *desc,
913 [out] ID2D1Bitmap **bitmap
915 HRESULT CreateBitmapFromWicBitmap(
916 [in] IWICBitmapSource *bitmap_source,
917 [in] const D2D1_BITMAP_PROPERTIES *desc,
918 [out] ID2D1Bitmap **bitmap
920 HRESULT CreateSharedBitmap(
921 [in] REFIID iid,
922 [in, out] void *data,
923 [in] const D2D1_BITMAP_PROPERTIES *desc,
924 [out] ID2D1Bitmap **bitmap
926 HRESULT CreateBitmapBrush(
927 [in] ID2D1Bitmap *bitmap,
928 [in] const D2D1_BITMAP_BRUSH_PROPERTIES *bitmap_brush_desc,
929 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
930 [out] ID2D1BitmapBrush **brush
932 HRESULT CreateSolidColorBrush(
933 [in] const D2D1_COLOR_F *color,
934 [in] const D2D1_BRUSH_PROPERTIES *desc,
935 [out] ID2D1SolidColorBrush **brush
937 HRESULT CreateGradientStopCollection(
938 [in, size_is(stop_count)] const D2D1_GRADIENT_STOP *stops,
939 [in] UINT32 stop_count,
940 [in] D2D1_GAMMA gamma,
941 [in] D2D1_EXTEND_MODE extend_mode,
942 [out] ID2D1GradientStopCollection **gradient
944 HRESULT CreateLinearGradientBrush(
945 [in] const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc,
946 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
947 [in] ID2D1GradientStopCollection *gradient,
948 [out] ID2D1LinearGradientBrush **brush
950 HRESULT CreateRadialGradientBrush(
951 [in] const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc,
952 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
953 [in] ID2D1GradientStopCollection *gradient,
954 [out] ID2D1RadialGradientBrush **brush
956 HRESULT CreateCompatibleRenderTarget(
957 [in] const D2D1_SIZE_F *size,
958 [in] const D2D1_SIZE_U *pixel_size,
959 [in] const D2D1_PIXEL_FORMAT *format,
960 [in] D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options,
961 [out] ID2D1BitmapRenderTarget **render_target
963 HRESULT CreateLayer(
964 [in] const D2D1_SIZE_F *size,
965 [out] ID2D1Layer **layer
967 HRESULT CreateMesh(
968 [out] ID2D1Mesh **mesh
970 void DrawLine(
971 [in] D2D1_POINT_2F p0,
972 [in] D2D1_POINT_2F p1,
973 [in] ID2D1Brush *brush,
974 [in] float stroke_width,
975 [in] ID2D1StrokeStyle *stroke_style
977 void DrawRectangle(
978 [in] const D2D1_RECT_F *rect,
979 [in] ID2D1Brush *brush,
980 [in] float stroke_width,
981 [in] ID2D1StrokeStyle *stroke_style
983 void FillRectangle(
984 [in] const D2D1_RECT_F *rect,
985 [in] ID2D1Brush *brush
987 void DrawRoundedRectangle(
988 [in] const D2D1_ROUNDED_RECT *rect,
989 [in] ID2D1Brush *brush,
990 [in] float stroke_width,
991 [in] ID2D1StrokeStyle *stroke_style
993 void FillRoundedRectangle(
994 [in] const D2D1_ROUNDED_RECT *rect,
995 [in] ID2D1Brush *brush
997 void DrawEllipse(
998 [in] const D2D1_ELLIPSE *ellipse,
999 [in] ID2D1Brush *brush,
1000 [in] float stroke_width,
1001 [in] ID2D1StrokeStyle *stroke_style
1003 void FillEllipse(
1004 [in] const D2D1_ELLIPSE *ellipse,
1005 [in] ID2D1Brush *brush
1007 void DrawGeometry(
1008 [in] ID2D1Geometry *geometry,
1009 [in] ID2D1Brush *brush,
1010 [in] float stroke_width,
1011 [in] ID2D1StrokeStyle *stroke_style
1013 void FillGeometry(
1014 [in] ID2D1Geometry *geometry,
1015 [in] ID2D1Brush *brush,
1016 [in] ID2D1Brush *opacity_brush
1018 void FillMesh(
1019 [in] ID2D1Mesh *mesh,
1020 [in] ID2D1Brush *brush
1022 void FillOpacityMask(
1023 [in] ID2D1Bitmap *mask,
1024 [in] ID2D1Brush *brush,
1025 [in] D2D1_OPACITY_MASK_CONTENT content,
1026 [in] const D2D1_RECT_F *dst_rect,
1027 [in] const D2D1_RECT_F *src_rect
1029 void DrawBitmap(
1030 [in] ID2D1Bitmap *bitmap,
1031 [in] const D2D1_RECT_F *dst_rect,
1032 [in] float opacity,
1033 [in] D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode,
1034 [in] const D2D1_RECT_F *src_rect
1036 void DrawText(
1037 [in, size_is(string_len)] const WCHAR *string,
1038 [in] UINT32 string_len,
1039 [in] IDWriteTextFormat *text_format,
1040 [in] const D2D1_RECT_F *layout_rect,
1041 [in] ID2D1Brush *brush,
1042 [in] D2D1_DRAW_TEXT_OPTIONS options,
1043 [in] DWRITE_MEASURING_MODE measuring_mode
1045 void DrawTextLayout(
1046 [in] D2D1_POINT_2F origin,
1047 [in] IDWriteTextLayout *layout,
1048 [in] ID2D1Brush *brush,
1049 [in] D2D1_DRAW_TEXT_OPTIONS options
1051 void DrawGlyphRun(
1052 [in] D2D1_POINT_2F baseline_origin,
1053 [in] const DWRITE_GLYPH_RUN *glyph_run,
1054 [in] ID2D1Brush *brush,
1055 [in] DWRITE_MEASURING_MODE measuring_mode
1057 void SetTransform(
1058 [in] const D2D1_MATRIX_3X2_F *transform
1060 void GetTransform(
1061 [out] D2D1_MATRIX_3X2_F *transform
1063 void SetAntialiasMode(
1064 [in] D2D1_ANTIALIAS_MODE antialias_mode
1066 D2D1_ANTIALIAS_MODE GetAntialiasMode();
1067 void SetTextAntialiasMode(
1068 [in] D2D1_TEXT_ANTIALIAS_MODE antialias_mode
1070 D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode();
1071 void SetTextRenderingParams(
1072 [in] IDWriteRenderingParams *text_rendering_params
1074 void GetTextRenderingParams(
1075 [out] IDWriteRenderingParams **text_rendering_params
1077 void SetTags(
1078 [in] D2D1_TAG tag1,
1079 [in] D2D1_TAG tag2
1081 void GetTags(
1082 [out] D2D1_TAG *tag1,
1083 [out] D2D1_TAG *tag2
1085 void PushLayer(
1086 [in] const D2D1_LAYER_PARAMETERS *layer_parameters,
1087 [in] ID2D1Layer *layer
1089 void PopLayer();
1090 HRESULT Flush(
1091 [out] D2D1_TAG *tag1,
1092 [out] D2D1_TAG *tag2
1094 void SaveDrawingState(
1095 [in, out] ID2D1DrawingStateBlock *state_block
1097 void RestoreDrawingState(
1098 [in] ID2D1DrawingStateBlock *state_block
1100 void PushAxisAlignedClip(
1101 [in] const D2D1_RECT_F *clip_rect,
1102 [in] D2D1_ANTIALIAS_MODE antialias_mode
1104 void PopAxisAlignedClip();
1105 void Clear(
1106 [in] const D2D1_COLOR_F *color
1108 void BeginDraw();
1109 HRESULT EndDraw(
1110 [out] D2D1_TAG *tag1,
1111 [out] D2D1_TAG *tag2
1113 D2D1_PIXEL_FORMAT GetPixelFormat();
1114 void SetDpi(
1115 [in] float dpi_x,
1116 [in] float dpi_y
1118 void GetDpi(
1119 [out] float *dpi_x,
1120 [out] float *dpi_y
1122 D2D1_SIZE_F GetSize();
1123 D2D1_SIZE_U GetPixelSize();
1124 UINT32 GetMaximumBitmapSize();
1125 BOOL IsSupported(
1126 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc
1131 local,
1132 object,
1133 uuid(2cd90695-12e2-11dc-9fed-001143a055f9)
1135 interface ID2D1BitmapRenderTarget : ID2D1RenderTarget
1137 HRESULT GetBitmap(
1138 [out] ID2D1Bitmap **bitmap
1143 local,
1144 object,
1145 uuid(2cd90698-12e2-11dc-9fed-001143a055f9)
1147 interface ID2D1HwndRenderTarget : ID2D1RenderTarget
1149 D2D1_WINDOW_STATE CheckWindowState();
1150 HRESULT Resize(
1151 [in] const D2D1_SIZE_U *size
1153 HWND GetHwnd();
1157 local,
1158 object,
1159 uuid(1c51bc64-de61-46fd-9899-63a5d8f03950)
1161 interface ID2D1DCRenderTarget : ID2D1RenderTarget
1163 HRESULT BindDC(
1164 [in] const HDC dc,
1165 [in] const RECT *rect
1170 local,
1171 object,
1172 uuid(e0db51c3-6f77-4bae-b3d5-e47509b35838)
1174 interface ID2D1GdiInteropRenderTarget : IUnknown
1176 HRESULT GetDC(
1177 [in] D2D1_DC_INITIALIZE_MODE mode,
1178 [out] HDC *dc
1180 HRESULT ReleaseDC(
1181 [in] const RECT *update
1186 local,
1187 object,
1188 uuid(06152247-6f50-465a-9245-118bfd3b6007)
1190 interface ID2D1Factory : IUnknown
1192 HRESULT ReloadSystemMetrics();
1193 void GetDesktopDpi(
1194 [out] float *dpi_x,
1195 [out] float *dpi_y
1197 HRESULT CreateRectangleGeometry(
1198 [in] const D2D1_RECT_F *rect,
1199 [out] ID2D1RectangleGeometry **geometry
1201 HRESULT CreateRoundedRectangleGeometry(
1202 [in] const D2D1_ROUNDED_RECT *rect,
1203 [out] ID2D1RoundedRectangleGeometry **geometry
1205 HRESULT CreateEllipseGeometry(
1206 [in] const D2D1_ELLIPSE *ellipse,
1207 [out] ID2D1EllipseGeometry **geometry
1209 HRESULT CreateGeometryGroup(
1210 [in] D2D1_FILL_MODE fill_mode,
1211 [in, size_is(geometry_count)] ID2D1Geometry **geometries,
1212 [in] UINT32 geometry_count,
1213 [out] ID2D1GeometryGroup **group
1215 HRESULT CreateTransformedGeometry(
1216 [in] ID2D1Geometry *src_geometry,
1217 [in] const D2D1_MATRIX_3X2_F *transform,
1218 [out] ID2D1TransformedGeometry **transformed_geometry
1220 HRESULT CreatePathGeometry(
1221 [out] ID2D1PathGeometry **geometry
1223 HRESULT CreateStrokeStyle(
1224 [in] const D2D1_STROKE_STYLE_PROPERTIES *desc,
1225 [in, size_is(dash_count)] const float *dashes,
1226 [in] UINT32 dash_count,
1227 [out] ID2D1StrokeStyle **stroke_style
1229 HRESULT CreateDrawingStateBlock(
1230 [in] const D2D1_DRAWING_STATE_DESCRIPTION *desc,
1231 [in] IDWriteRenderingParams *text_rendering_params,
1232 [out] ID2D1DrawingStateBlock **state_block
1234 HRESULT CreateWicBitmapRenderTarget(
1235 [in] IWICBitmap *target,
1236 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1237 [out] ID2D1RenderTarget **render_target
1239 HRESULT CreateHwndRenderTarget(
1240 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1241 [in] const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwnd_rt_desc,
1242 [out] ID2D1HwndRenderTarget **render_target
1244 HRESULT CreateDxgiSurfaceRenderTarget(
1245 [in] IDXGISurface *surface,
1246 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1247 [out] ID2D1RenderTarget **render_target
1249 HRESULT CreateDCRenderTarget(
1250 [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
1251 [out] ID2D1DCRenderTarget **render_target
1255 [local] HRESULT __stdcall D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid,
1256 const D2D1_FACTORY_OPTIONS *factory_options, void **factory);
1257 [local] BOOL __stdcall D2D1InvertMatrix(D2D1_MATRIX_3X2_F *matrix);
1258 [local] BOOL __stdcall D2D1IsMatrixInvertible(const D2D1_MATRIX_3X2_F *matrix);
1259 [local] void __stdcall D2D1MakeRotateMatrix(float angle, D2D1_POINT_2F center, D2D1_MATRIX_3X2_F *matrix);
1260 [local] void __stdcall D2D1MakeSkewMatrix(float angle_x, float angle_y, D2D1_POINT_2F center, D2D1_MATRIX_3X2_F *matrix);