gdi32: Try to parse font names without FreeType.
[wine/zf.git] / include / d2d1_1.idl
bloba72a6a9e9be653448de086ce8db41c6214f80edc
1 /*
2 * Copyright 2017 Lucian Poston
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 "d2d1.idl";
21 interface ID2D1DeviceContext;
22 interface ID2D1StrokeStyle1;
23 interface ID2D1PathGeometry1;
24 interface ID2D1Properties;
25 interface IPrintDocumentPackageTarget;
26 interface ID2D1PrintControl;
27 interface IWICImagingFactory;
28 interface IWICColorContext;
29 interface ID2D1ColorContext;
30 interface ID2D1Effect;
31 interface ID2D1GradientStopCollection1;
32 interface ID2D1ImageBrush;
33 interface ID2D1BitmapBrush1;
35 cpp_quote("#ifndef __dwrite_h__")
36 /* already defined in dwrite.h but needed for WIDL */
37 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION;
38 cpp_quote("#endif /* __dwrite_h__ */")
40 typedef enum D2D1_DEVICE_CONTEXT_OPTIONS
42 D2D1_DEVICE_CONTEXT_OPTIONS_NONE = 0x0,
43 D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS = 0x1,
44 D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD = 0xffffffff,
45 } D2D1_DEVICE_CONTEXT_OPTIONS;
47 typedef enum D2D1_STROKE_TRANSFORM_TYPE
49 D2D1_STROKE_TRANSFORM_TYPE_NORMAL = 0x0,
50 D2D1_STROKE_TRANSFORM_TYPE_FIXED = 0x1,
51 D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE = 0x2,
52 D2D1_STROKE_TRANSFORM_TYPE_FORCE_DWORD = 0xffffffff,
53 } D2D1_STROKE_TRANSFORM_TYPE;
55 typedef enum D2D1_PRIMITIVE_BLEND
57 D2D1_PRIMITIVE_BLEND_SOURCE_OVER = 0x0,
58 D2D1_PRIMITIVE_BLEND_COPY = 0x1,
59 D2D1_PRIMITIVE_BLEND_MIN = 0x2,
60 D2D1_PRIMITIVE_BLEND_ADD = 0x3,
61 D2D1_PRIMITIVE_BLEND_MAX = 0x4,
62 D2D1_PRIMITIVE_BLEND_FORCE_DWORD = 0xffffffff,
63 } D2D1_PRIMITIVE_BLEND;
65 typedef enum D2D1_UNIT_MODE
67 D2D1_UNIT_MODE_DIPS = 0x0,
68 D2D1_UNIT_MODE_PIXELS = 0x1,
69 D2D1_UNIT_MODE_FORCE_DWORD = 0xffffffff,
70 } D2D1_UNIT_MODE;
72 typedef enum D2D1_PRINT_FONT_SUBSET_MODE
74 D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT = 0x0,
75 D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE = 0x1,
76 D2D1_PRINT_FONT_SUBSET_MODE_NONE = 0x2,
77 D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD = 0xffffffff,
78 } D2D1_PRINT_FONT_SUBSET_MODE;
80 typedef enum D2D1_COLOR_SPACE
82 D2D1_COLOR_SPACE_CUSTOM = 0x0,
83 D2D1_COLOR_SPACE_SRGB = 0x1,
84 D2D1_COLOR_SPACE_SCRGB = 0x2,
85 D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff,
86 } D2D1_COLOR_SPACE;
88 typedef enum D2D1_BITMAP_OPTIONS
90 D2D1_BITMAP_OPTIONS_NONE = 0x0,
91 D2D1_BITMAP_OPTIONS_TARGET = 0x1,
92 D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x2,
93 D2D1_BITMAP_OPTIONS_CPU_READ = 0x4,
94 D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x8,
95 D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff,
96 } D2D1_BITMAP_OPTIONS;
98 typedef enum D2D1_MAP_OPTIONS
100 D2D1_MAP_OPTIONS_NONE = 0x0,
101 D2D1_MAP_OPTIONS_READ = 0x1,
102 D2D1_MAP_OPTIONS_WRITE = 0x2,
103 D2D1_MAP_OPTIONS_DISCARD = 0x4,
104 D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff,
105 } D2D1_MAP_OPTIONS;
107 typedef enum D2D1_BUFFER_PRECISION
109 D2D1_BUFFER_PRECISION_UNKNOWN = 0x0,
110 D2D1_BUFFER_PRECISION_8BPC_UNORM = 0x1,
111 D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 0x2,
112 D2D1_BUFFER_PRECISION_16BPC_UNORM = 0x3,
113 D2D1_BUFFER_PRECISION_16BPC_FLOAT = 0x4,
114 D2D1_BUFFER_PRECISION_32BPC_FLOAT = 0x5,
115 D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff,
116 } D2D1_BUFFER_PRECISION;
118 typedef enum D2D1_COLOR_INTERPOLATION_MODE
120 D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT = 0x0,
121 D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED = 0x1,
122 D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
123 } D2D1_COLOR_INTERPOLATION_MODE;
125 typedef enum D2D1_INTERPOLATION_MODE
127 D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
128 D2D1_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
129 D2D1_INTERPOLATION_MODE_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC,
130 D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR,
131 D2D1_INTERPOLATION_MODE_ANISOTROPIC = D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC,
132 D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC,
133 D2D1_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
134 } D2D1_INTERPOLATION_MODE;
136 typedef enum D2D1_COMPOSITE_MODE
138 D2D1_COMPOSITE_MODE_SOURCE_OVER = 0x0,
139 D2D1_COMPOSITE_MODE_DESTINATION_OVER = 0x1,
140 D2D1_COMPOSITE_MODE_SOURCE_IN = 0x2,
141 D2D1_COMPOSITE_MODE_DESTINATION_IN = 0x3,
142 D2D1_COMPOSITE_MODE_SOURCE_OUT = 0x4,
143 D2D1_COMPOSITE_MODE_DESTINATION_OUT = 0x5,
144 D2D1_COMPOSITE_MODE_SOURCE_ATOP = 0x6,
145 D2D1_COMPOSITE_MODE_DESTINATION_ATOP = 0x7,
146 D2D1_COMPOSITE_MODE_XOR = 0x8,
147 D2D1_COMPOSITE_MODE_PLUS = 0x9,
148 D2D1_COMPOSITE_MODE_SOURCE_COPY = 0xa,
149 D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY = 0xb,
150 D2D1_COMPOSITE_MODE_MASK_INVERT = 0xc,
151 D2D1_COMPOSITE_MODE_FORCE_DWORD = 0xffffffff,
152 } D2D1_COMPOSITE_MODE;
154 typedef enum D2D1_LAYER_OPTIONS1
156 D2D1_LAYER_OPTIONS1_NONE = 0x0,
157 D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND = 0x1,
158 D2D1_LAYER_OPTIONS1_IGNORE_ALPHA = 0x2,
159 D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff,
160 } D2D1_LAYER_OPTIONS1;
162 typedef struct D2D1_PROPERTY_BINDING D2D1_PROPERTY_BINDING;
163 typedef D2D_MATRIX_4X4_F D2D1_MATRIX_4X4_F;
165 typedef enum D2D1_PROPERTY_TYPE
167 D2D1_PROPERTY_TYPE_UNKNOWN = 0x0,
168 D2D1_PROPERTY_TYPE_STRING = 0x1,
169 D2D1_PROPERTY_TYPE_BOOL = 0x2,
170 D2D1_PROPERTY_TYPE_UINT32 = 0x3,
171 D2D1_PROPERTY_TYPE_INT32 = 0x4,
172 D2D1_PROPERTY_TYPE_FLOAT = 0x5,
173 D2D1_PROPERTY_TYPE_VECTOR2 = 0x6,
174 D2D1_PROPERTY_TYPE_VECTOR3 = 0x7,
175 D2D1_PROPERTY_TYPE_VECTOR4 = 0x8,
176 D2D1_PROPERTY_TYPE_BLOB = 0x9,
177 D2D1_PROPERTY_TYPE_IUNKNOWN = 0xa,
178 D2D1_PROPERTY_TYPE_ENUM = 0xb,
179 D2D1_PROPERTY_TYPE_ARRAY = 0xc,
180 D2D1_PROPERTY_TYPE_CLSID = 0xd,
181 D2D1_PROPERTY_TYPE_MATRIX_3X2 = 0xe,
182 D2D1_PROPERTY_TYPE_MATRIX_4X3 = 0xf,
183 D2D1_PROPERTY_TYPE_MATRIX_4X4 = 0x10,
184 D2D1_PROPERTY_TYPE_MATRIX_5X4 = 0x11,
185 D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 0x12,
186 D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff,
187 } D2D1_PROPERTY_TYPE;
189 typedef enum D2D1_PROPERTY
191 D2D1_PROPERTY_CLSID = 0x80000000,
192 D2D1_PROPERTY_DISPLAYNAME = 0x80000001,
193 D2D1_PROPERTY_AUTHOR = 0x80000002,
194 D2D1_PROPERTY_CATEGORY = 0x80000003,
195 D2D1_PROPERTY_DESCRIPTION = 0x80000004,
196 D2D1_PROPERTY_INPUTS = 0x80000005,
197 D2D1_PROPERTY_CACHED = 0x80000006,
198 D2D1_PROPERTY_PRECISION = 0x80000007,
199 D2D1_PROPERTY_MIN_INPUTS = 0x80000008,
200 D2D1_PROPERTY_MAX_INPUTS = 0x80000009,
201 D2D1_PROPERTY_FORCE_DWORD = 0xffffffff
202 } D2D1_PROPERTY;
204 typedef enum D2D1_SUBPROPERTY
206 D2D1_SUBPROPERTY_DISPLAYNAME = 0x80000000,
207 D2D1_SUBPROPERTY_ISREADONLY = 0x80000001,
208 D2D1_SUBPROPERTY_MIN = 0x80000002,
209 D2D1_SUBPROPERTY_MAX = 0x80000003,
210 D2D1_SUBPROPERTY_DEFAULT = 0x80000004,
211 D2D1_SUBPROPERTY_FIELDS = 0x80000005,
212 D2D1_SUBPROPERTY_INDEX = 0x80000006,
213 D2D1_SUBPROPERTY_FORCE_DWORD = 0xffffffff
214 } D2D1_SUBPROPERTY;
216 typedef enum D2D1_THREADING_MODE
218 D2D1_THREADING_MODE_SINGLE_THREADED = D2D1_FACTORY_TYPE_SINGLE_THREADED,
219 D2D1_THREADING_MODE_MULTI_THREADED = D2D1_FACTORY_TYPE_MULTI_THREADED,
220 D2D1_THREADING_MODE_FORCE_DWORD = 0xffffffff,
221 } D2D1_THREADING_MODE;
223 typedef struct D2D1_CREATION_PROPERTIES
225 D2D1_THREADING_MODE threadingMode;
226 D2D1_DEBUG_LEVEL debugLevel;
227 D2D1_DEVICE_CONTEXT_OPTIONS options;
228 } D2D1_CREATION_PROPERTIES;
230 typedef struct D2D1_STROKE_STYLE_PROPERTIES1
232 D2D1_CAP_STYLE startCap;
233 D2D1_CAP_STYLE endCap;
234 D2D1_CAP_STYLE dashCap;
235 D2D1_LINE_JOIN lineJoin;
236 float miterLimit;
237 D2D1_DASH_STYLE dashStyle;
238 float dashOffset;
239 D2D1_STROKE_TRANSFORM_TYPE transformType;
240 } D2D1_STROKE_STYLE_PROPERTIES1;
242 typedef struct D2D1_DRAWING_STATE_DESCRIPTION1
244 D2D1_ANTIALIAS_MODE antialiasMode;
245 D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
246 D2D1_TAG tag1;
247 D2D1_TAG tag2;
248 D2D1_MATRIX_3X2_F transform;
249 D2D1_PRIMITIVE_BLEND primitiveBlend;
250 D2D1_UNIT_MODE unitMode;
251 } D2D1_DRAWING_STATE_DESCRIPTION1;
253 typedef struct D2D1_PRINT_CONTROL_PROPERTIES
255 D2D1_PRINT_FONT_SUBSET_MODE fontSubset;
256 float rasterDPI;
257 D2D1_COLOR_SPACE colorSpace;
258 } D2D1_PRINT_CONTROL_PROPERTIES;
260 typedef struct D2D1_MAPPED_RECT
262 UINT32 pitch;
263 BYTE *bits;
264 } D2D1_MAPPED_RECT;
266 typedef struct D2D1_BITMAP_PROPERTIES1
268 D2D1_PIXEL_FORMAT pixelFormat;
269 float dpiX;
270 float dpiY;
271 D2D1_BITMAP_OPTIONS bitmapOptions;
272 ID2D1ColorContext *colorContext;
273 } D2D1_BITMAP_PROPERTIES1;
275 typedef struct D2D1_IMAGE_BRUSH_PROPERTIES
277 D2D1_RECT_F sourceRectangle;
278 D2D1_EXTEND_MODE extendModeX;
279 D2D1_EXTEND_MODE extendModeY;
280 D2D1_INTERPOLATION_MODE interpolationMode;
281 } D2D1_IMAGE_BRUSH_PROPERTIES;
283 typedef struct D2D1_BITMAP_BRUSH_PROPERTIES1
285 D2D1_EXTEND_MODE extendModeX;
286 D2D1_EXTEND_MODE extendModeY;
287 D2D1_INTERPOLATION_MODE interpolationMode;
288 } D2D1_BITMAP_BRUSH_PROPERTIES1;
290 typedef struct D2D1_RENDERING_CONTROLS
292 D2D1_BUFFER_PRECISION bufferPrecision;
293 D2D1_SIZE_U tileSize;
294 } D2D1_RENDERING_CONTROLS;
296 typedef struct D2D1_LAYER_PARAMETERS1
298 D2D1_RECT_F contentBounds;
299 ID2D1Geometry *geometricMask;
300 D2D1_ANTIALIAS_MODE maskAntialiasMode;
301 D2D1_MATRIX_3X2_F maskTransform;
302 float opacity;
303 ID2D1Brush *opacityBrush;
304 D2D1_LAYER_OPTIONS1 layerOptions;
305 } D2D1_LAYER_PARAMETERS1;
307 typedef struct D2D1_EFFECT_INPUT_DESCRIPTION
309 ID2D1Effect *effect;
310 UINT32 inputIndex;
311 D2D1_RECT_F inputRectangle;
312 } D2D1_EFFECT_INPUT_DESCRIPTION;
314 typedef struct D2D1_POINT_DESCRIPTION
316 D2D1_POINT_2F point;
317 D2D1_POINT_2F unitTangentVector;
318 UINT32 endSegment;
319 UINT32 endFigure;
320 float lengthToEndSegment;
321 } D2D1_POINT_DESCRIPTION;
323 typedef HRESULT (__stdcall *PD2D1_EFFECT_FACTORY)(IUnknown **effect);
326 object,
327 uuid(82237326-8111-4f7c-bcf4-b5c1175564fe),
328 local,
330 interface ID2D1GdiMetafileSink : IUnknown
332 HRESULT ProcessRecord(
333 [in] DWORD type,
334 [in, optional] const void *data,
335 [in] DWORD size
340 object,
341 uuid(2f543dc3-cfc1-4211-864f-cfd91c6f3395),
342 local,
344 interface ID2D1GdiMetafile : ID2D1Resource
346 HRESULT Stream(
347 [in] ID2D1GdiMetafileSink *sink
349 HRESULT GetBounds(
350 [out] D2D1_RECT_F *bounds
355 object,
356 uuid(483473d7-cd46-4f9d-9d3a-3112aa80159d),
357 local,
359 interface ID2D1Properties : IUnknown
361 UINT32 GetPropertyCount();
362 HRESULT GetPropertyName(
363 [in] UINT32 index,
364 [out] WCHAR *name,
365 [in] UINT32 name_count
367 UINT32 GetPropertyNameLength(
368 [in] UINT32 index
370 D2D1_PROPERTY_TYPE GetType(
371 [in] UINT32 index
373 UINT32 GetPropertyIndex(
374 [in] const WCHAR *name
376 HRESULT SetValueByName(
377 [in] const WCHAR *name,
378 [in] D2D1_PROPERTY_TYPE type,
379 [in] const BYTE *value,
380 [in] UINT32 value_size
382 HRESULT SetValue(
383 [in] UINT32 index,
384 [in] D2D1_PROPERTY_TYPE type,
385 [in] const BYTE *value,
386 [in] UINT32 value_size
388 HRESULT GetValueByName(
389 [in] const WCHAR *name,
390 [in] D2D1_PROPERTY_TYPE type,
391 [out] BYTE *value,
392 [in] UINT32 value_size
394 HRESULT GetValue(
395 [in] UINT32 index,
396 [in] D2D1_PROPERTY_TYPE type,
397 [out] BYTE *value,
398 [in] UINT32 value_size
400 UINT32 GetValueSize(
401 [in] UINT32 index
403 HRESULT GetSubProperties(
404 [in] UINT32 index,
405 [out] ID2D1Properties **props
410 object,
411 uuid(28211a43-7d89-476f-8181-2d6159b220ad),
412 local,
414 interface ID2D1Effect : ID2D1Properties
416 void SetInput(
417 [in] UINT32 index,
418 [in] ID2D1Image *input,
419 [in] BOOL invalidate
421 HRESULT SetInputCount(
422 [in] UINT32 count
424 void GetInput(
425 [in] UINT32 index,
426 [out] ID2D1Image **input
428 UINT32 GetInputCount();
429 void GetOutput(
430 [out] ID2D1Image **output
435 object,
436 uuid(689f1f85-c72e-4e33-8f19-85754efd5ace),
437 local,
439 interface ID2D1DrawingStateBlock1 : ID2D1DrawingStateBlock
441 void GetDescription(
442 [out] D2D1_DRAWING_STATE_DESCRIPTION1 *desc
444 void SetDescription(
445 [in] const D2D1_DRAWING_STATE_DESCRIPTION1 *desc
450 object,
451 uuid(a898a84c-3873-4588-b08b-ebbf978df041),
452 local,
454 interface ID2D1Bitmap1 : ID2D1Bitmap
456 void GetColorContext(
457 [out] ID2D1ColorContext **context
459 D2D1_BITMAP_OPTIONS GetOptions();
460 HRESULT GetSurface(
461 [out] IDXGISurface **surface
463 HRESULT Map(
464 [in] D2D1_MAP_OPTIONS options,
465 [out] D2D1_MAPPED_RECT *mapped_rect
467 HRESULT Unmap();
471 object,
472 uuid(41343a53-e41a-49a2-91cd-21793bbb62e5),
473 local,
475 interface ID2D1BitmapBrush1 : ID2D1BitmapBrush
477 void SetInterpolationMode1(
478 [in] D2D1_INTERPOLATION_MODE mode
480 D2D1_INTERPOLATION_MODE GetInterpolationMode1();
484 object,
485 uuid(47dd575d-ac05-4cdd-8049-9b02cd16f44c),
486 local,
488 interface ID2D1Device : ID2D1Resource
490 HRESULT CreateDeviceContext(
491 [in] D2D1_DEVICE_CONTEXT_OPTIONS options,
492 [out] ID2D1DeviceContext **context
494 HRESULT CreatePrintControl(
495 [in] IWICImagingFactory *wic_factory,
496 [in] IPrintDocumentPackageTarget *document_target,
497 [in] const D2D1_PRINT_CONTROL_PROPERTIES *desc,
498 [out] ID2D1PrintControl **print_control
500 void SetMaximumTextureMemory(
501 [in] UINT64 max_texture_memory
503 UINT64 GetMaximumTextureMemory();
504 HRESULT ClearResources(
505 [in, defaultvalue(0)] UINT msec_since_use
510 object,
511 uuid(54d7898a-a061-40a7-bec7-e465bcba2c4f),
512 local,
514 interface ID2D1CommandSink : IUnknown
516 HRESULT BeginDraw();
517 HRESULT EndDraw();
518 HRESULT SetAntialiasMode(
519 [in] D2D1_ANTIALIAS_MODE antialias_mode
521 HRESULT SetTags(
522 [in] D2D1_TAG tag1,
523 [in] D2D1_TAG tag2
525 HRESULT SetTextAntialiasMode(
526 [in] D2D1_TEXT_ANTIALIAS_MODE antialias_mode
528 HRESULT SetTextRenderingParams(
529 [in] IDWriteRenderingParams *text_rendering_params
531 HRESULT SetTransform(
532 [in] D2D1_MATRIX_3X2_F *transform
534 HRESULT SetPrimitiveBlend(
535 [in] D2D1_PRIMITIVE_BLEND primitive_blend
537 HRESULT SetUnitMode(
538 [in] D2D1_UNIT_MODE unit_mode
540 HRESULT Clear(
541 [in] const D2D1_COLOR_F *color
543 HRESULT DrawGlyphRun(
544 [in] D2D1_POINT_2F baseline_origin,
545 [in] const DWRITE_GLYPH_RUN *glyph_run,
546 [in] const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc,
547 [in] ID2D1Brush *brush,
548 [in] DWRITE_MEASURING_MODE measuring_mode
550 HRESULT DrawLine(
551 [in] D2D1_POINT_2F p0,
552 [in] D2D1_POINT_2F p1,
553 [in] ID2D1Brush *brush,
554 [in] float stroke_width,
555 [in] ID2D1StrokeStyle *stroke_style
557 HRESULT DrawGeometry(
558 [in] ID2D1Geometry *geometry,
559 [in] ID2D1Brush *brush,
560 [in] float stroke_width,
561 [in] ID2D1StrokeStyle *stroke_style
563 HRESULT DrawRectangle(
564 [in] const D2D1_RECT_F *rect,
565 [in] ID2D1Brush *brush,
566 [in] float stroke_width,
567 [in] ID2D1StrokeStyle *stroke_style
569 HRESULT DrawBitmap(
570 [in] ID2D1Bitmap *bitmap,
571 [in] const D2D1_RECT_F *dst_rect,
572 [in] float opacity,
573 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
574 [in] const D2D1_RECT_F *src_rect,
575 [in] const D2D1_MATRIX_4X4_F *perspective_transform
577 HRESULT DrawImage(
578 [in] ID2D1Image *image,
579 [in] const D2D1_POINT_2F *target_offset,
580 [in] const D2D1_POINT_2F *image_rect,
581 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
582 [in] D2D1_COMPOSITE_MODE composite_mode
584 HRESULT DrawGdiMetafile(
585 [in] ID2D1GdiMetafile *metafile,
586 [in] const D2D1_POINT_2F *target_offset
588 HRESULT FillMesh(
589 [in] ID2D1Mesh *mesh,
590 [in] ID2D1Brush *brush
592 HRESULT FillOpacityMask(
593 [in] ID2D1Bitmap *bitmap,
594 [in] ID2D1Brush *brush,
595 [in] const D2D1_RECT_F *dst_rect,
596 [in] const D2D1_RECT_F *src_rect
598 HRESULT FillGeometry(
599 [in] ID2D1Geometry *geometry,
600 [in] ID2D1Brush *brush,
601 [in] ID2D1Brush *opacity_brush
603 HRESULT FillRectangle(
604 [in] const D2D1_RECT_F *rect,
605 [in] ID2D1Brush *brush
607 HRESULT PushAxisAlignedClip(
608 [in] const D2D1_RECT_F *clip_rect,
609 [in] D2D1_ANTIALIAS_MODE antialias_mode
611 HRESULT PushLayer(
612 [in] const D2D1_LAYER_PARAMETERS1 *layer_parameters,
613 [in] ID2D1Layer *layer
615 HRESULT PopAxisAlignedClip();
616 HRESULT PopLayer();
620 object,
621 uuid(b4f34a19-2383-4d76-94f6-ec343657c3dc),
622 local,
624 interface ID2D1CommandList : ID2D1Image
626 HRESULT Stream(
627 [in] ID2D1CommandSink *sink
629 HRESULT Close();
633 object,
634 uuid(2c1d867d-c290-41c8-ae7e-34a98702e9a5),
635 local,
637 interface ID2D1PrintControl : IUnknown
639 HRESULT AddPage(
640 [in] ID2D1CommandList *list,
641 [in] D2D_SIZE_F size,
642 [in, optional] IStream *stream,
643 [out, optional] D2D1_TAG *tag1,
644 [out, optional] D2D1_TAG *tag2
646 HRESULT Close();
650 object,
651 uuid(e8f7fe7a-191c-466d-ad95-975678bda998),
652 local,
654 interface ID2D1DeviceContext : ID2D1RenderTarget
656 HRESULT CreateBitmap(
657 [in] D2D1_SIZE_U size,
658 [in] const void *src_data,
659 [in] UINT32 pitch,
660 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
661 [out] ID2D1Bitmap1 **bitmap
663 HRESULT CreateBitmapFromWicBitmap(
664 [in] IWICBitmapSource *bitmap_source,
665 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
666 [out] ID2D1Bitmap1 **bitmap
668 HRESULT CreateColorContext(
669 [in] D2D1_COLOR_SPACE space,
670 [in] const BYTE *profile,
671 [in] UINT32 profile_size,
672 [out] ID2D1ColorContext **color_context
674 HRESULT CreateColorContextFromFilename(
675 [in] const WCHAR *filename,
676 [out] ID2D1ColorContext **color_context
678 HRESULT CreateColorContextFromWicColorContext(
679 [in] IWICColorContext *wic_color_context,
680 [out] ID2D1ColorContext **color_context
682 HRESULT CreateBitmapFromDxgiSurface(
683 [in] IDXGISurface *surface,
684 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
685 [out] ID2D1Bitmap1 **bitmap
687 HRESULT CreateEffect(
688 [in] REFCLSID effect_id,
689 [out] ID2D1Effect **effect
691 HRESULT CreateGradientStopCollection(
692 [in] const D2D1_GRADIENT_STOP *stops,
693 [in] UINT32 stop_count,
694 [in] D2D1_COLOR_SPACE preinterpolation_space,
695 [in] D2D1_COLOR_SPACE postinterpolation_space,
696 [in] D2D1_BUFFER_PRECISION buffer_precision,
697 [in] D2D1_EXTEND_MODE extend_mode,
698 [in] D2D1_COLOR_INTERPOLATION_MODE color_interpolation_mode,
699 [out] ID2D1GradientStopCollection1 **gradient
701 HRESULT CreateImageBrush(
702 [in] ID2D1Image *image,
703 [in] const D2D1_IMAGE_BRUSH_PROPERTIES *image_brush_desc,
704 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
705 [out] ID2D1ImageBrush **brush
707 HRESULT CreateBitmapBrush(
708 [in] ID2D1Bitmap *bitmap,
709 [in] const D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmap_brush_desc,
710 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
711 [out] ID2D1BitmapBrush1 **bitmap_brush
713 HRESULT CreateCommandList(
714 [out] ID2D1CommandList **command_list
716 BOOL IsDxgiFormatSupported(
717 [in] DXGI_FORMAT format
719 BOOL IsBufferPrecisionSupported(
720 [in] D2D1_BUFFER_PRECISION buffer_precision
722 void GetImageLocalBounds(
723 [in] ID2D1Image *image,
724 [out] D2D1_RECT_F *local_bounds
726 HRESULT GetImageWorldBounds(
727 [in] ID2D1Image *image,
728 [out] D2D1_RECT_F *world_bounds
730 HRESULT GetGlyphRunWorldBounds(
731 [in] D2D1_POINT_2F baseline_origin,
732 [in] const DWRITE_GLYPH_RUN *glyph_run,
733 [in] DWRITE_MEASURING_MODE measuring_mode,
734 [out] D2D1_RECT_F *bounds
736 void GetDevice(
737 [out] ID2D1Device **device
739 void SetTarget(
740 [in] ID2D1Image *target
742 void GetTarget(
743 [out] ID2D1Image **target
745 void SetRenderingControls(
746 [in] const D2D1_RENDERING_CONTROLS *rendering_controls
748 void GetRenderingControls(
749 [out] D2D1_RENDERING_CONTROLS *rendering_controls
751 void SetPrimitiveBlend(
752 [in] D2D1_PRIMITIVE_BLEND primitive_blend
754 D2D1_PRIMITIVE_BLEND GetPrimitiveBlend();
755 void SetUnitMode(
756 [in] D2D1_UNIT_MODE unit_mode
758 D2D1_UNIT_MODE GetUnitMode();
759 void DrawGlyphRun(
760 [in] D2D1_POINT_2F baseline_origin,
761 [in] const DWRITE_GLYPH_RUN *glyph_run,
762 [in] const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc,
763 [in] ID2D1Brush *brush,
764 [in] DWRITE_MEASURING_MODE measuring_mode
766 void DrawImage(
767 [in] ID2D1Image *image,
768 [in] const D2D1_POINT_2F *target_offset,
769 [in] const D2D1_RECT_F *image_rect,
770 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
771 [in] D2D1_COMPOSITE_MODE composite_mode
773 void DrawGdiMetafile(
774 [in] ID2D1GdiMetafile *metafile,
775 [in] const D2D1_POINT_2F *target_offset
777 void DrawBitmap(
778 [in] ID2D1Bitmap *bitmap,
779 [in] const D2D1_RECT_F *dst_rect,
780 [in] float opacity,
781 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
782 [in] const D2D1_RECT_F *src_rect,
783 [in] const D2D1_MATRIX_4X4_F *perspective_transform
785 void PushLayer(
786 [in] const D2D1_LAYER_PARAMETERS1 *layer_parameters,
787 [in] ID2D1Layer *layer
789 HRESULT InvalidateEffectInputRectangle(
790 [in] ID2D1Effect *effect,
791 [in] UINT32 input,
792 [in] const D2D1_RECT_F *input_rect
794 HRESULT GetEffectInvalidRectangleCount(
795 [in] ID2D1Effect *effect,
796 [out] UINT32 *rect_count
798 HRESULT GetEffectInvalidRectangles(
799 [in] ID2D1Effect *effect,
800 [out] D2D1_RECT_F *rectangles,
801 [in] UINT32 rect_count
803 HRESULT GetEffectRequiredInputRectangles(
804 [in] ID2D1Effect *effect,
805 [in] const D2D1_RECT_F *image_rect,
806 [in] const D2D1_EFFECT_INPUT_DESCRIPTION *desc,
807 [out] D2D1_RECT_F *input_rect,
808 [in] UINT32 input_count
810 void FillOpacityMask(
811 [in] ID2D1Bitmap *mask,
812 [in] ID2D1Brush *brush,
813 [in] const D2D1_RECT_F *dst_rect,
814 [in] const D2D1_RECT_F *src_rect
819 object,
820 uuid(bb12d362-daee-4b9a-aa1d-14ba401cfa1f),
821 local,
823 interface ID2D1Factory1 : ID2D1Factory
825 HRESULT CreateDevice(
826 [in] IDXGIDevice *dxgi_device,
827 [out] ID2D1Device **device
829 HRESULT CreateStrokeStyle(
830 [in] const D2D1_STROKE_STYLE_PROPERTIES1 *desc,
831 [in, size_is(dash_count)] const float *dashes,
832 [in] UINT32 dash_count,
833 [out] ID2D1StrokeStyle1 **stroke_style
835 HRESULT CreatePathGeometry(
836 [out] ID2D1PathGeometry1 **geometry
838 HRESULT CreateDrawingStateBlock(
839 [in] const D2D1_DRAWING_STATE_DESCRIPTION1 *desc,
840 [in] IDWriteRenderingParams *text_rendering_params,
841 [out] ID2D1DrawingStateBlock1 **state_block
843 HRESULT CreateGdiMetafile(
844 [in] IStream *stream,
845 [out] ID2D1GdiMetafile **metafile
847 HRESULT RegisterEffectFromStream(
848 [in] REFCLSID effect_id,
849 [in] IStream *property_xml,
850 [in, size_is(binding_count)] const D2D1_PROPERTY_BINDING *bindings,
851 [in] UINT32 binding_count,
852 [in] PD2D1_EFFECT_FACTORY effect_factory
854 HRESULT RegisterEffectFromString(
855 [in] REFCLSID effect_id,
856 [in] const WCHAR *property_xml,
857 [in, size_is(binding_count)] const D2D1_PROPERTY_BINDING *bindings,
858 [in] UINT32 binding_count,
859 [in] PD2D1_EFFECT_FACTORY effect_factory
861 HRESULT UnregisterEffect(
862 [in] REFCLSID effect_id
864 HRESULT GetRegisteredEffects(
865 [out, size_is(effect_count)] CLSID *effects,
866 [in] UINT32 effect_count,
867 [out] UINT32 *returned,
868 [out] UINT32 *registered
870 HRESULT GetEffectProperties(
871 [in] REFCLSID effect_id,
872 [out] ID2D1Properties **props
876 [local] HRESULT __stdcall D2D1CreateDevice(IDXGIDevice *dxgi_device,
877 const D2D1_CREATION_PROPERTIES *creation_properties, ID2D1Device **device);
878 [local] void __stdcall D2D1SinCos(float angle, float *s, float *c);
879 [local] float __stdcall D2D1Tan(float angle);
880 [local] float __stdcall D2D1Vec3Length(float x, float y, float z);