ntdll: Move the Wine version functions to the Unix library.
[wine.git] / include / d2d1_1.idl
blob4a644ffd4caa1a429c07018434b42b139f69c9af
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 ID2D1GdiMetafile;
25 interface ID2D1Properties;
26 interface IPrintDocumentPackageTarget;
27 interface ID2D1PrintControl;
28 interface IWICImagingFactory;
29 interface IWICColorContext;
30 interface ID2D1ColorContext;
31 interface ID2D1Effect;
32 interface ID2D1GradientStopCollection1;
33 interface ID2D1ImageBrush;
34 interface ID2D1BitmapBrush1;
36 cpp_quote("#ifndef __dwrite_h__")
37 /* already defined in dwrite.h but needed for WIDL */
38 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION;
39 cpp_quote("#endif /* __dwrite_h__ */")
41 typedef enum D2D1_DEVICE_CONTEXT_OPTIONS
43 D2D1_DEVICE_CONTEXT_OPTIONS_NONE = 0x0,
44 D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS = 0x1,
45 D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD = 0xffffffff,
46 } D2D1_DEVICE_CONTEXT_OPTIONS;
48 typedef enum D2D1_STROKE_TRANSFORM_TYPE
50 D2D1_STROKE_TRANSFORM_TYPE_NORMAL = 0x0,
51 D2D1_STROKE_TRANSFORM_TYPE_FIXED = 0x1,
52 D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE = 0x2,
53 D2D1_STROKE_TRANSFORM_TYPE_FORCE_DWORD = 0xffffffff,
54 } D2D1_STROKE_TRANSFORM_TYPE;
56 typedef enum D2D1_PRIMITIVE_BLEND
58 D2D1_PRIMITIVE_BLEND_SOURCE_OVER = 0x0,
59 D2D1_PRIMITIVE_BLEND_COPY = 0x1,
60 D2D1_PRIMITIVE_BLEND_MIN = 0x2,
61 D2D1_PRIMITIVE_BLEND_ADD = 0x3,
62 D2D1_PRIMITIVE_BLEND_MAX = 0x4,
63 D2D1_PRIMITIVE_BLEND_FORCE_DWORD = 0xffffffff,
64 } D2D1_PRIMITIVE_BLEND;
66 typedef enum D2D1_UNIT_MODE
68 D2D1_UNIT_MODE_DIPS = 0x0,
69 D2D1_UNIT_MODE_PIXELS = 0x1,
70 D2D1_UNIT_MODE_FORCE_DWORD = 0xffffffff,
71 } D2D1_UNIT_MODE;
73 typedef enum D2D1_PRINT_FONT_SUBSET_MODE
75 D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT = 0x0,
76 D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE = 0x1,
77 D2D1_PRINT_FONT_SUBSET_MODE_NONE = 0x2,
78 D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD = 0xffffffff,
79 } D2D1_PRINT_FONT_SUBSET_MODE;
81 typedef enum D2D1_COLOR_SPACE
83 D2D1_COLOR_SPACE_CUSTOM = 0x0,
84 D2D1_COLOR_SPACE_SRGB = 0x1,
85 D2D1_COLOR_SPACE_SCRGB = 0x2,
86 D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff,
87 } D2D1_COLOR_SPACE;
89 typedef enum D2D1_BITMAP_OPTIONS
91 D2D1_BITMAP_OPTIONS_NONE = 0x0,
92 D2D1_BITMAP_OPTIONS_TARGET = 0x1,
93 D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x2,
94 D2D1_BITMAP_OPTIONS_CPU_READ = 0x4,
95 D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x8,
96 D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff,
97 } D2D1_BITMAP_OPTIONS;
99 typedef enum D2D1_MAP_OPTIONS
101 D2D1_MAP_OPTIONS_NONE = 0x0,
102 D2D1_MAP_OPTIONS_READ = 0x1,
103 D2D1_MAP_OPTIONS_WRITE = 0x2,
104 D2D1_MAP_OPTIONS_DISCARD = 0x4,
105 D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff,
106 } D2D1_MAP_OPTIONS;
108 typedef enum D2D1_BUFFER_PRECISION
110 D2D1_BUFFER_PRECISION_UNKNOWN = 0x0,
111 D2D1_BUFFER_PRECISION_8BPC_UNORM = 0x1,
112 D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 0x2,
113 D2D1_BUFFER_PRECISION_16BPC_UNORM = 0x3,
114 D2D1_BUFFER_PRECISION_16BPC_FLOAT = 0x4,
115 D2D1_BUFFER_PRECISION_32BPC_FLOAT = 0x5,
116 D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff,
117 } D2D1_BUFFER_PRECISION;
119 typedef enum D2D1_COLOR_INTERPOLATION_MODE
121 D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT = 0x0,
122 D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED = 0x1,
123 D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
124 } D2D1_COLOR_INTERPOLATION_MODE;
126 typedef enum D2D1_INTERPOLATION_MODE
128 D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
129 D2D1_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
130 D2D1_INTERPOLATION_MODE_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC,
131 D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR,
132 D2D1_INTERPOLATION_MODE_ANISOTROPIC = D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC,
133 D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC,
134 D2D1_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
135 } D2D1_INTERPOLATION_MODE;
137 typedef enum D2D1_COMPOSITE_MODE
139 D2D1_COMPOSITE_MODE_SOURCE_OVER = 0x0,
140 D2D1_COMPOSITE_MODE_DESTINATION_OVER = 0x1,
141 D2D1_COMPOSITE_MODE_SOURCE_IN = 0x2,
142 D2D1_COMPOSITE_MODE_DESTINATION_IN = 0x3,
143 D2D1_COMPOSITE_MODE_SOURCE_OUT = 0x4,
144 D2D1_COMPOSITE_MODE_DESTINATION_OUT = 0x5,
145 D2D1_COMPOSITE_MODE_SOURCE_ATOP = 0x6,
146 D2D1_COMPOSITE_MODE_DESTINATION_ATOP = 0x7,
147 D2D1_COMPOSITE_MODE_XOR = 0x8,
148 D2D1_COMPOSITE_MODE_PLUS = 0x9,
149 D2D1_COMPOSITE_MODE_SOURCE_COPY = 0xa,
150 D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY = 0xb,
151 D2D1_COMPOSITE_MODE_MASK_INVERT = 0xc,
152 D2D1_COMPOSITE_MODE_FORCE_DWORD = 0xffffffff,
153 } D2D1_COMPOSITE_MODE;
155 typedef enum D2D1_LAYER_OPTIONS1
157 D2D1_LAYER_OPTIONS1_NONE = 0x0,
158 D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND = 0x1,
159 D2D1_LAYER_OPTIONS1_IGNORE_ALPHA = 0x2,
160 D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff,
161 } D2D1_LAYER_OPTIONS1;
163 typedef struct D2D1_PROPERTY_BINDING D2D1_PROPERTY_BINDING;
164 typedef D2D_MATRIX_4X4_F D2D1_MATRIX_4X4_F;
166 typedef enum D2D1_PROPERTY_TYPE
168 D2D1_PROPERTY_TYPE_UNKNOWN = 0x0,
169 D2D1_PROPERTY_TYPE_STRING = 0x1,
170 D2D1_PROPERTY_TYPE_BOOL = 0x2,
171 D2D1_PROPERTY_TYPE_UINT32 = 0x3,
172 D2D1_PROPERTY_TYPE_INT32 = 0x4,
173 D2D1_PROPERTY_TYPE_FLOAT = 0x5,
174 D2D1_PROPERTY_TYPE_VECTOR2 = 0x6,
175 D2D1_PROPERTY_TYPE_VECTOR3 = 0x7,
176 D2D1_PROPERTY_TYPE_VECTOR4 = 0x8,
177 D2D1_PROPERTY_TYPE_BLOB = 0x9,
178 D2D1_PROPERTY_TYPE_IUNKNOWN = 0xa,
179 D2D1_PROPERTY_TYPE_ENUM = 0xb,
180 D2D1_PROPERTY_TYPE_ARRAY = 0xc,
181 D2D1_PROPERTY_TYPE_CLSID = 0xd,
182 D2D1_PROPERTY_TYPE_MATRIX_3X2 = 0xe,
183 D2D1_PROPERTY_TYPE_MATRIX_4X3 = 0xf,
184 D2D1_PROPERTY_TYPE_MATRIX_4X4 = 0x10,
185 D2D1_PROPERTY_TYPE_MATRIX_5X4 = 0x11,
186 D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 0x12,
187 D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff,
188 } D2D1_PROPERTY_TYPE;
190 typedef struct D2D1_STROKE_STYLE_PROPERTIES1
192 D2D1_CAP_STYLE startCap;
193 D2D1_CAP_STYLE endCap;
194 D2D1_CAP_STYLE dashCap;
195 D2D1_LINE_JOIN lineJoin;
196 float miterLimit;
197 D2D1_DASH_STYLE dashStyle;
198 float dashOffset;
199 D2D1_STROKE_TRANSFORM_TYPE transformType;
200 } D2D1_STROKE_STYLE_PROPERTIES1;
202 typedef struct D2D1_DRAWING_STATE_DESCRIPTION1
204 D2D1_ANTIALIAS_MODE antialiasMode;
205 D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
206 D2D1_TAG tag1;
207 D2D1_TAG tag2;
208 D2D1_MATRIX_3X2_F transform;
209 D2D1_PRIMITIVE_BLEND primitiveBlend;
210 D2D1_UNIT_MODE unitMode;
211 } D2D1_DRAWING_STATE_DESCRIPTION1;
213 typedef struct D2D1_PRINT_CONTROL_PROPERTIES
215 D2D1_PRINT_FONT_SUBSET_MODE fontSubset;
216 float rasterDPI;
217 D2D1_COLOR_SPACE colorSpace;
218 } D2D1_PRINT_CONTROL_PROPERTIES;
220 typedef struct D2D1_MAPPED_RECT
222 UINT32 pitch;
223 BYTE *bits;
224 } D2D1_MAPPED_RECT;
226 typedef struct D2D1_BITMAP_PROPERTIES1
228 D2D1_PIXEL_FORMAT pixelFormat;
229 float dpiX;
230 float dpiY;
231 D2D1_BITMAP_OPTIONS bitmapOptions;
232 ID2D1ColorContext *colorContext;
233 } D2D1_BITMAP_PROPERTIES1;
235 typedef struct D2D1_IMAGE_BRUSH_PROPERTIES
237 D2D1_RECT_F sourceRectangle;
238 D2D1_EXTEND_MODE extendModeX;
239 D2D1_EXTEND_MODE extendModeY;
240 D2D1_INTERPOLATION_MODE interpolationMode;
241 } D2D1_IMAGE_BRUSH_PROPERTIES;
243 typedef struct D2D1_BITMAP_BRUSH_PROPERTIES1
245 D2D1_EXTEND_MODE extendModeX;
246 D2D1_EXTEND_MODE extendModeY;
247 D2D1_INTERPOLATION_MODE interpolationMode;
248 } D2D1_BITMAP_BRUSH_PROPERTIES1;
250 typedef struct D2D1_RENDERING_CONTROLS
252 D2D1_BUFFER_PRECISION bufferPrecision;
253 D2D1_SIZE_U tileSize;
254 } D2D1_RENDERING_CONTROLS;
256 typedef struct D2D1_LAYER_PARAMETERS1
258 D2D1_RECT_F contentBounds;
259 ID2D1Geometry *geometricMask;
260 D2D1_ANTIALIAS_MODE maskAntialiasMode;
261 D2D1_MATRIX_3X2_F maskTransform;
262 float opacity;
263 ID2D1Brush *opacityBrush;
264 D2D1_LAYER_OPTIONS1 layerOptions;
265 } D2D1_LAYER_PARAMETERS1;
267 typedef struct D2D1_EFFECT_INPUT_DESCRIPTION
269 ID2D1Effect *effect;
270 UINT32 inputIndex;
271 D2D1_RECT_F inputRectangle;
272 } D2D1_EFFECT_INPUT_DESCRIPTION;
274 typedef HRESULT (__stdcall *PD2D1_EFFECT_FACTORY)(IUnknown **effect);
277 object,
278 uuid(483473d7-cd46-4f9d-9d3a-3112aa80159d),
279 local,
281 interface ID2D1Properties : IUnknown
283 UINT32 GetPropertyCount();
284 HRESULT GetPropertyName(
285 [in] UINT32 index,
286 [out] WCHAR *name,
287 [in] UINT32 name_count
289 UINT32 GetPropertyNameLength(
290 [in] UINT32 index
292 D2D1_PROPERTY_TYPE GetType(
293 [in] UINT32 index
295 UINT32 GetPropertyIndex(
296 [in] const WCHAR *name
298 HRESULT SetValueByName(
299 [in] const WCHAR *name,
300 [in] D2D1_PROPERTY_TYPE type,
301 [in] const BYTE *value,
302 [in] UINT32 value_size
304 HRESULT SetValue(
305 [in] UINT32 index,
306 [in] D2D1_PROPERTY_TYPE type,
307 [in] const BYTE *value,
308 [in] UINT32 value_size
310 HRESULT GetValueByName(
311 [in] const WCHAR *name,
312 [in] D2D1_PROPERTY_TYPE type,
313 [out] BYTE *value,
314 [in] UINT32 value_size
316 HRESULT GetValue(
317 [in] UINT32 index,
318 [in] D2D1_PROPERTY_TYPE type,
319 [out] BYTE *value,
320 [in] UINT32 value_size
322 UINT32 GetValueSize(
323 [in] UINT32 index
325 HRESULT GetSubProperties(
326 [in] UINT32 index,
327 [out] ID2D1Properties **props
332 object,
333 uuid(28211a43-7d89-476f-8181-2d6159b220ad),
334 local,
336 interface ID2D1Effect : ID2D1Properties
338 void SetInput(
339 [in] UINT32 index,
340 [in] ID2D1Image *input,
341 [in] BOOL invalidate
343 HRESULT SetInputCount(
344 [in] UINT32 count
346 void GetInput(
347 [in] UINT32 index,
348 [out] ID2D1Image **input
350 UINT32 GetInputCount();
351 void GetOutput(
352 [out] ID2D1Image **output
357 object,
358 uuid(689f1f85-c72e-4e33-8f19-85754efd5ace),
359 local,
361 interface ID2D1DrawingStateBlock1 : ID2D1DrawingStateBlock
363 void GetDescription(
364 [out] D2D1_DRAWING_STATE_DESCRIPTION1 *desc
366 void SetDescription(
367 [in] const D2D1_DRAWING_STATE_DESCRIPTION1 *desc
372 object,
373 uuid(a898a84c-3873-4588-b08b-ebbf978df041),
374 local,
376 interface ID2D1Bitmap1 : ID2D1Bitmap
378 void GetColorContext(
379 [out] ID2D1ColorContext **context
381 D2D1_BITMAP_OPTIONS GetOptions();
382 HRESULT GetSurface(
383 [out] IDXGISurface **surface
385 HRESULT Map(
386 [in] D2D1_MAP_OPTIONS options,
387 [out] D2D1_MAPPED_RECT *mapped_rect
389 HRESULT Unmap();
393 object,
394 uuid(41343a53-e41a-49a2-91cd-21793bbb62e5),
395 local,
397 interface ID2D1BitmapBrush1 : ID2D1BitmapBrush
399 void SetInterpolationMode1(
400 [in] D2D1_INTERPOLATION_MODE mode
402 D2D1_INTERPOLATION_MODE GetInterpolationMode1();
406 object,
407 uuid(47dd575d-ac05-4cdd-8049-9b02cd16f44c),
408 local,
410 interface ID2D1Device : ID2D1Resource
412 HRESULT CreateDeviceContext(
413 [in] D2D1_DEVICE_CONTEXT_OPTIONS options,
414 [out] ID2D1DeviceContext **context
416 HRESULT CreatePrintControl(
417 [in] IWICImagingFactory *wic_factory,
418 [in] IPrintDocumentPackageTarget *document_target,
419 [in] const D2D1_PRINT_CONTROL_PROPERTIES *desc,
420 [out] ID2D1PrintControl **print_control
422 void SetMaximumTextureMemory(
423 [in] UINT64 max_texture_memory
425 UINT64 GetMaximumTextureMemory();
426 HRESULT ClearResources(
427 [in, defaultvalue(0)] UINT msec_since_use
432 object,
433 uuid(54d7898a-a061-40a7-bec7-e465bcba2c4f),
434 local,
436 interface ID2D1CommandSink : IUnknown
438 HRESULT BeginDraw();
439 HRESULT EndDraw();
440 HRESULT SetAntialiasMode(
441 [in] D2D1_ANTIALIAS_MODE antialias_mode
443 HRESULT SetTags(
444 [in] D2D1_TAG tag1,
445 [in] D2D1_TAG tag2
447 HRESULT SetTextAntialiasMode(
448 [in] D2D1_TEXT_ANTIALIAS_MODE antialias_mode
450 HRESULT SetTextRenderingParams(
451 [in] IDWriteRenderingParams *text_rendering_params
453 HRESULT SetTransform(
454 [in] D2D1_MATRIX_3X2_F *transform
456 HRESULT SetPrimitiveBlend(
457 [in] D2D1_PRIMITIVE_BLEND primitive_blend
459 HRESULT SetUnitMode(
460 [in] D2D1_UNIT_MODE unit_mode
462 HRESULT Clear(
463 [in] const D2D1_COLOR_F *color
465 HRESULT DrawGlyphRun(
466 [in] D2D1_POINT_2F baseline_origin,
467 [in] const DWRITE_GLYPH_RUN *glyph_run,
468 [in] const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc,
469 [in] ID2D1Brush *brush,
470 [in] DWRITE_MEASURING_MODE measuring_mode
472 HRESULT DrawLine(
473 [in] D2D1_POINT_2F p0,
474 [in] D2D1_POINT_2F p1,
475 [in] ID2D1Brush *brush,
476 [in] float stroke_width,
477 [in] ID2D1StrokeStyle *stroke_style
479 HRESULT DrawGeometry(
480 [in] ID2D1Geometry *geometry,
481 [in] ID2D1Brush *brush,
482 [in] float stroke_width,
483 [in] ID2D1StrokeStyle *stroke_style
485 HRESULT DrawRectangle(
486 [in] const D2D1_RECT_F *rect,
487 [in] ID2D1Brush *brush,
488 [in] float stroke_width,
489 [in] ID2D1StrokeStyle *stroke_style
491 HRESULT DrawBitmap(
492 [in] ID2D1Bitmap *bitmap,
493 [in] const D2D1_RECT_F *dst_rect,
494 [in] float opacity,
495 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
496 [in] const D2D1_RECT_F *src_rect,
497 [in] const D2D1_MATRIX_4X4_F *perspective_transform
499 HRESULT DrawImage(
500 [in] ID2D1Image *image,
501 [in] const D2D1_POINT_2F *target_offset,
502 [in] const D2D1_POINT_2F *image_rect,
503 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
504 [in] D2D1_COMPOSITE_MODE composite_mode
506 HRESULT DrawGdiMetafile(
507 [in] ID2D1GdiMetafile *metafile,
508 [in] const D2D1_POINT_2F *target_offset
510 HRESULT FillMesh(
511 [in] ID2D1Mesh *mesh,
512 [in] ID2D1Brush *brush
514 HRESULT FillOpacityMask(
515 [in] ID2D1Bitmap *bitmap,
516 [in] ID2D1Brush *brush,
517 [in] const D2D1_RECT_F *dst_rect,
518 [in] const D2D1_RECT_F *src_rect
520 HRESULT FillGeometry(
521 [in] ID2D1Geometry *geometry,
522 [in] ID2D1Brush *brush,
523 [in] ID2D1Brush *opacity_brush
525 HRESULT FillRectangle(
526 [in] const D2D1_RECT_F *rect,
527 [in] ID2D1Brush *brush
529 HRESULT PushAxisAlignedClip(
530 [in] const D2D1_RECT_F *clip_rect,
531 [in] D2D1_ANTIALIAS_MODE antialias_mode
533 HRESULT PushLayer(
534 [in] const D2D1_LAYER_PARAMETERS1 *layer_parameters,
535 [in] ID2D1Layer *layer
537 HRESULT PopAxisAlignedClip();
538 HRESULT PopLayer();
542 object,
543 uuid(b4f34a19-2383-4d76-94f6-ec343657c3dc),
544 local,
546 interface ID2D1CommandList : ID2D1Image
548 HRESULT Stream(
549 [in] ID2D1CommandSink *sink
551 HRESULT Close();
555 object,
556 uuid(e8f7fe7a-191c-466d-ad95-975678bda998),
557 local,
559 interface ID2D1DeviceContext : ID2D1RenderTarget
561 HRESULT CreateBitmap(
562 [in] D2D1_SIZE_U size,
563 [in] const void *src_data,
564 [in] UINT32 pitch,
565 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
566 [out] ID2D1Bitmap1 **bitmap
568 HRESULT CreateBitmapFromWicBitmap(
569 [in] IWICBitmapSource *bitmap_source,
570 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
571 [out] ID2D1Bitmap1 **bitmap
573 HRESULT CreateColorContext(
574 [in] D2D1_COLOR_SPACE space,
575 [in] const BYTE *profile,
576 [in] UINT32 profile_size,
577 [out] ID2D1ColorContext **color_context
579 HRESULT CreateColorContextFromFilename(
580 [in] const WCHAR *filename,
581 [out] ID2D1ColorContext **color_context
583 HRESULT CreateColorContextFromWicColorContext(
584 [in] IWICColorContext *wic_color_context,
585 [out] ID2D1ColorContext **color_context
587 HRESULT CreateBitmapFromDxgiSurface(
588 [in] IDXGISurface *surface,
589 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
590 [out] ID2D1Bitmap1 **bitmap
592 HRESULT CreateEffect(
593 [in] REFCLSID effect_id,
594 [out] ID2D1Effect **effect
596 HRESULT CreateGradientStopCollection(
597 [in] const D2D1_GRADIENT_STOP *stops,
598 [in] UINT32 stop_count,
599 [in] D2D1_COLOR_SPACE preinterpolation_space,
600 [in] D2D1_COLOR_SPACE postinterpolation_space,
601 [in] D2D1_BUFFER_PRECISION buffer_precision,
602 [in] D2D1_EXTEND_MODE extend_mode,
603 [in] D2D1_COLOR_INTERPOLATION_MODE color_interpolation_mode,
604 [out] ID2D1GradientStopCollection1 **gradient
606 HRESULT CreateImageBrush(
607 [in] ID2D1Image *image,
608 [in] const D2D1_IMAGE_BRUSH_PROPERTIES *image_brush_desc,
609 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
610 [out] ID2D1ImageBrush **brush
612 HRESULT CreateBitmapBrush(
613 [in] ID2D1Bitmap *bitmap,
614 [in] const D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmap_brush_desc,
615 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
616 [out] ID2D1BitmapBrush1 **bitmap_brush
618 HRESULT CreateCommandList(
619 [out] ID2D1CommandList **command_list
621 BOOL IsDxgiFormatSupported(
622 [in] DXGI_FORMAT format
624 BOOL IsBufferPrecisionSupported(
625 [in] D2D1_BUFFER_PRECISION buffer_precision
627 void GetImageLocalBounds(
628 [in] ID2D1Image *image,
629 [out] D2D1_RECT_F *local_bounds
631 HRESULT GetImageWorldBounds(
632 [in] ID2D1Image *image,
633 [out] D2D1_RECT_F *world_bounds
635 HRESULT GetGlyphRunWorldBounds(
636 [in] D2D1_POINT_2F baseline_origin,
637 [in] const DWRITE_GLYPH_RUN *glyph_run,
638 [in] DWRITE_MEASURING_MODE measuring_mode,
639 [out] D2D1_RECT_F *bounds
641 void GetDevice(
642 [out] ID2D1Device **device
644 void SetTarget(
645 [in] ID2D1Image *target
647 void GetTarget(
648 [out] ID2D1Image **target
650 void SetRenderingControls(
651 [in] const D2D1_RENDERING_CONTROLS *rendering_controls
653 void GetRenderingControls(
654 [out] D2D1_RENDERING_CONTROLS *rendering_controls
656 void SetPrimitiveBlend(
657 [in] D2D1_PRIMITIVE_BLEND primitive_blend
659 D2D1_PRIMITIVE_BLEND GetPrimitiveBlend();
660 void SetUnitMode(
661 [in] D2D1_UNIT_MODE unit_mode
663 D2D1_UNIT_MODE GetUnitMode();
664 void DrawGlyphRun(
665 [in] D2D1_POINT_2F baseline_origin,
666 [in] const DWRITE_GLYPH_RUN *glyph_run,
667 [in] const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc,
668 [in] ID2D1Brush *brush,
669 [in] DWRITE_MEASURING_MODE measuring_mode
671 void DrawImage(
672 [in] ID2D1Image *image,
673 [in] const D2D1_POINT_2F *target_offset,
674 [in] const D2D1_RECT_F *image_rect,
675 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
676 [in] D2D1_COMPOSITE_MODE composite_mode
678 void DrawGdiMetafile(
679 [in] ID2D1GdiMetafile *metafile,
680 [in] const D2D1_POINT_2F *target_offset
682 void DrawBitmap(
683 [in] ID2D1Bitmap *bitmap,
684 [in] const D2D1_RECT_F *dst_rect,
685 [in] float opacity,
686 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
687 [in] const D2D1_RECT_F *src_rect,
688 [in] const D2D1_MATRIX_4X4_F *perspective_transform
690 void PushLayer(
691 [in] const D2D1_LAYER_PARAMETERS1 *layer_parameters,
692 [in] ID2D1Layer *layer
694 HRESULT InvalidateEffectInputRectangle(
695 [in] ID2D1Effect *effect,
696 [in] UINT32 input,
697 [in] const D2D1_RECT_F *input_rect
699 HRESULT GetEffectInvalidRectangleCount(
700 [in] ID2D1Effect *effect,
701 [out] UINT32 *rect_count
703 HRESULT GetEffectInvalidRectangles(
704 [in] ID2D1Effect *effect,
705 [out] D2D1_RECT_F *rectangles,
706 [in] UINT32 rect_count
708 HRESULT GetEffectRequiredInputRectangles(
709 [in] ID2D1Effect *effect,
710 [in] const D2D1_RECT_F *image_rect,
711 [in] const D2D1_EFFECT_INPUT_DESCRIPTION *desc,
712 [out] D2D1_RECT_F *input_rect,
713 [in] UINT32 input_count
715 void FillOpacityMask(
716 [in] ID2D1Bitmap *mask,
717 [in] ID2D1Brush *brush,
718 [in] const D2D1_RECT_F *dst_rect,
719 [in] const D2D1_RECT_F *src_rect
724 object,
725 uuid(bb12d362-daee-4b9a-aa1d-14ba401cfa1f),
726 local,
728 interface ID2D1Factory1 : ID2D1Factory
730 HRESULT CreateDevice(
731 [in] IDXGIDevice *dxgi_device,
732 [out] ID2D1Device **device
734 HRESULT CreateStrokeStyle(
735 [in] const D2D1_STROKE_STYLE_PROPERTIES1 *desc,
736 [in, size_is(dash_count)] const float *dashes,
737 [in] UINT32 dash_count,
738 [out] ID2D1StrokeStyle1 **stroke_style
740 HRESULT CreatePathGeometry(
741 [out] ID2D1PathGeometry1 **geometry
743 HRESULT CreateDrawingStateBlock(
744 [in] const D2D1_DRAWING_STATE_DESCRIPTION1 *desc,
745 [in] IDWriteRenderingParams *text_rendering_params,
746 [out] ID2D1DrawingStateBlock1 **state_block
748 HRESULT CreateGdiMetafile(
749 [in] IStream *stream,
750 [out] ID2D1GdiMetafile **metafile
752 HRESULT RegisterEffectFromStream(
753 [in] REFCLSID effect_id,
754 [in] IStream *property_xml,
755 [in, size_is(binding_count)] const D2D1_PROPERTY_BINDING *bindings,
756 [in] UINT32 binding_count,
757 [in] PD2D1_EFFECT_FACTORY effect_factory
759 HRESULT RegisterEffectFromString(
760 [in] REFCLSID effect_id,
761 [in] const WCHAR *property_xml,
762 [in, size_is(binding_count)] const D2D1_PROPERTY_BINDING *bindings,
763 [in] UINT32 binding_count,
764 [in] PD2D1_EFFECT_FACTORY effect_factory
766 HRESULT UnregisterEffect(
767 [in] REFCLSID effect_id
769 HRESULT GetRegisteredEffects(
770 [out, size_is(effect_count)] CLSID *effects,
771 [in] UINT32 effect_count,
772 [out] UINT32 *returned,
773 [out] UINT32 *registered
775 HRESULT GetEffectProperties(
776 [in] REFCLSID effect_id,
777 [out] ID2D1Properties **props