2 * Copyright 2022 Ziqing Hui 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
21 typedef enum D2D1_INK_NIB_SHAPE
23 D2D1_INK_NIB_SHAPE_ROUND
= 0x0,
24 D2D1_INK_NIB_SHAPE_SQUARE
= 0x1,
25 D2D1_INK_NIB_SHAPE_FORCE_DWORD
= 0xffffffff
28 typedef enum D2D1_PATCH_EDGE_MODE
30 D2D1_PATCH_EDGE_MODE_ALIASED
= 0x0,
31 D2D1_PATCH_EDGE_MODE_ANTIALIASED
= 0x1,
32 D2D1_PATCH_EDGE_MODE_ALIASED_INFLATED
= 0x2,
33 D2D1_PATCH_EDGE_MODE_FORCE_DWORD
= 0xffffffff
34 } D2D1_PATCH_EDGE_MODE
;
36 typedef enum D2D1_ORIENTATION
38 D2D1_ORIENTATION_DEFAULT
= 0x1,
39 D2D1_ORIENTATION_FLIP_HORIZONTAL
= 0x2,
40 D2D1_ORIENTATION_ROTATE_CLOCKWISE180
= 0x3,
41 D2D1_ORIENTATION_ROTATE_CLOCKWISE180_FLIP_HORIZONTAL
= 0x4,
42 D2D1_ORIENTATION_ROTATE_CLOCKWISE90_FLIP_HORIZONTAL
= 0x5,
43 D2D1_ORIENTATION_ROTATE_CLOCKWISE270
= 0x6,
44 D2D1_ORIENTATION_ROTATE_CLOCKWISE270_FLIP_HORIZONTAL
= 0x7,
45 D2D1_ORIENTATION_ROTATE_CLOCKWISE90
= 0x8,
46 D2D1_ORIENTATION_FORCE_DWORD
= 0xffffffff
49 typedef enum D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS
51 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_NONE
= 0x0,
52 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_DISABLE_DPI_SCALE
= 0x1,
53 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_FORCE_DWORD
= 0xffffffff
54 } D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS
;
56 typedef struct D2D1_INK_POINT
63 typedef struct D2D1_INK_BEZIER_SEGMENT
65 D2D1_INK_POINT point1
;
66 D2D1_INK_POINT point2
;
67 D2D1_INK_POINT point3
;
68 } D2D1_INK_BEZIER_SEGMENT
;
70 typedef struct D2D1_GRADIENT_MESH_PATCH
72 D2D1_POINT_2F point00
;
73 D2D1_POINT_2F point01
;
74 D2D1_POINT_2F point02
;
75 D2D1_POINT_2F point03
;
76 D2D1_POINT_2F point10
;
77 D2D1_POINT_2F point11
;
78 D2D1_POINT_2F point12
;
79 D2D1_POINT_2F point13
;
80 D2D1_POINT_2F point20
;
81 D2D1_POINT_2F point21
;
82 D2D1_POINT_2F point22
;
83 D2D1_POINT_2F point23
;
84 D2D1_POINT_2F point30
;
85 D2D1_POINT_2F point31
;
86 D2D1_POINT_2F point32
;
87 D2D1_POINT_2F point33
;
92 D2D1_PATCH_EDGE_MODE topEdgeMode
;
93 D2D1_PATCH_EDGE_MODE leftEdgeMode
;
94 D2D1_PATCH_EDGE_MODE bottomEdgeMode
;
95 D2D1_PATCH_EDGE_MODE rightEdgeMode
;
96 } D2D1_GRADIENT_MESH_PATCH
;
98 typedef struct D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES
100 D2D1_ORIENTATION orientation
;
103 D2D1_INTERPOLATION_MODE interpolationMode
;
104 D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS options
;
105 } D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES
;
109 uuid(bae8b344
-23fc
-4071-8cb5
-d05d6f073848
),
112 interface ID2D1InkStyle
: ID2D1Resource
114 void SetNibTransform
(
115 [in] const D2D1_MATRIX_3X2_F
*transform
117 void GetNibTransform
(
118 [out] D2D1_MATRIX_3X2_F
*transform
121 [in] D2D1_INK_NIB_SHAPE shape
123 D2D1_INK_NIB_SHAPE GetNibShape
();
128 uuid(b499923b
-7029-478f
-a8b3
-432c7c5f5312
),
131 interface ID2D1Ink
: ID2D1Resource
134 [in] const D2D1_INK_POINT
*start_point
136 D2D1_INK_POINT GetStartPoint
();
138 [in] const D2D1_INK_BEZIER_SEGMENT
*segments
,
139 [in] UINT32 segment_count
141 HRESULT RemoveSegmentsAtEnd
(
142 [in] UINT32 segment_count
145 [in] UINT32 start_segment
,
146 [in] const D2D1_INK_BEZIER_SEGMENT
*segments
,
147 [in] UINT32 segment_count
149 HRESULT SetSegmentAtEnd
(
150 [in] const D2D1_INK_BEZIER_SEGMENT
*segment
152 UINT32 GetSegmentCount
();
154 [in] UINT32 start_segment
,
155 [out] D2D1_INK_BEZIER_SEGMENT
*segments
,
156 [in] UINT32 segment_count
158 HRESULT StreamAsGeometry
(
159 [in, optional] ID2D1InkStyle
*ink_style
,
160 [in, optional] const D2D1_MATRIX_3X2_F
*world_transform
,
161 [in] float flattening_tolerance
,
162 [in] ID2D1SimplifiedGeometrySink
*geometry_sink
165 [in, optional] ID2D1InkStyle
*ink_style
,
166 [in, optional] const D2D1_MATRIX_3X2_F
*world_transform
,
167 [out] D2D1_RECT_F
*bounds
173 uuid(f292e401
-c050
-4cde
-83d7
-04962d3b23c2
),
176 interface ID2D1GradientMesh
: ID2D1Resource
178 UINT32 GetPatchCount
();
180 [in] UINT32 start_index
,
181 [out] D2D1_GRADIENT_MESH_PATCH
*patches
,
182 [in] UINT32 patch_count
188 uuid(c9b664e5
-74a1
-4378-9ac2
-eefc37a3f4d8
),
191 interface ID2D1ImageSource
: ID2D1Image
193 HRESULT OfferResources
();
194 HRESULT TryReclaimResources
(
195 [out] BOOL
*resources_discarded
201 uuid(77395441-1c8f
-4555-8683-f50dab0fe792
),
204 interface ID2D1ImageSourceFromWic
: ID2D1ImageSource
206 HRESULT EnsureCached
(
207 [in, optional] const D2D1_RECT_U
*rect_to_fill
210 [in, optional] const D2D1_RECT_U
*rect_to_preserve
213 [out] IWICBitmapSource
**source
219 uuid(7f1f79e5
-2796-416c
-8f55
-700f911445e5
),
222 interface ID2D1TransformedImageSource
: ID2D1Image
225 [out] ID2D1ImageSource
**source
228 [out] D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES
*out