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 struct D2D1_INK_POINT
35 typedef struct D2D1_INK_BEZIER_SEGMENT
37 D2D1_INK_POINT point1
;
38 D2D1_INK_POINT point2
;
39 D2D1_INK_POINT point3
;
40 } D2D1_INK_BEZIER_SEGMENT
;
42 typedef enum D2D1_PATCH_EDGE_MODE
44 D2D1_PATCH_EDGE_MODE_ALIASED
= 0x0,
45 D2D1_PATCH_EDGE_MODE_ANTIALIASED
= 0x1,
46 D2D1_PATCH_EDGE_MODE_ALIASED_INFLATED
= 0x2,
47 D2D1_PATCH_EDGE_MODE_FORCE_DWORD
= 0xffffffff
48 } D2D1_PATCH_EDGE_MODE
;
50 typedef struct D2D1_GRADIENT_MESH_PATCH
52 D2D1_POINT_2F point00
;
53 D2D1_POINT_2F point01
;
54 D2D1_POINT_2F point02
;
55 D2D1_POINT_2F point03
;
56 D2D1_POINT_2F point10
;
57 D2D1_POINT_2F point11
;
58 D2D1_POINT_2F point12
;
59 D2D1_POINT_2F point13
;
60 D2D1_POINT_2F point20
;
61 D2D1_POINT_2F point21
;
62 D2D1_POINT_2F point22
;
63 D2D1_POINT_2F point23
;
64 D2D1_POINT_2F point30
;
65 D2D1_POINT_2F point31
;
66 D2D1_POINT_2F point32
;
67 D2D1_POINT_2F point33
;
72 D2D1_PATCH_EDGE_MODE topEdgeMode
;
73 D2D1_PATCH_EDGE_MODE leftEdgeMode
;
74 D2D1_PATCH_EDGE_MODE bottomEdgeMode
;
75 D2D1_PATCH_EDGE_MODE rightEdgeMode
;
76 } D2D1_GRADIENT_MESH_PATCH
;
80 uuid(bae8b344
-23fc
-4071-8cb5
-d05d6f073848
),
83 interface ID2D1InkStyle
: ID2D1Resource
86 [in] const D2D1_MATRIX_3X2_F
*transform
89 [out] D2D1_MATRIX_3X2_F
*transform
92 [in] D2D1_INK_NIB_SHAPE shape
94 D2D1_INK_NIB_SHAPE GetNibShape
();
99 uuid(b499923b
-7029-478f
-a8b3
-432c7c5f5312
),
102 interface ID2D1Ink
: ID2D1Resource
105 [in] const D2D1_INK_POINT
*start_point
107 D2D1_INK_POINT GetStartPoint
();
109 [in] const D2D1_INK_BEZIER_SEGMENT
*segments
,
110 [in] UINT32 segment_count
112 HRESULT RemoveSegmentsAtEnd
(
113 [in] UINT32 segment_count
116 [in] UINT32 start_segment
,
117 [in] const D2D1_INK_BEZIER_SEGMENT
*segments
,
118 [in] UINT32 segment_count
120 HRESULT SetSegmentAtEnd
(
121 [in] const D2D1_INK_BEZIER_SEGMENT
*segment
123 UINT32 GetSegmentCount
();
125 [in] UINT32 start_segment
,
126 [out] D2D1_INK_BEZIER_SEGMENT
*segments
,
127 [in] UINT32 segment_count
129 HRESULT StreamAsGeometry
(
130 [in, optional] ID2D1InkStyle
*ink_style
,
131 [in, optional] const D2D1_MATRIX_3X2_F
*world_transform
,
132 [in] float flattening_tolerance
,
133 [in] ID2D1SimplifiedGeometrySink
*geometry_sink
136 [in, optional] ID2D1InkStyle
*ink_style
,
137 [in, optional] const D2D1_MATRIX_3X2_F
*world_transform
,
138 [out] D2D1_RECT_F
*bounds
144 uuid(f292e401
-c050
-4cde
-83d7
-04962d3b23c2
),
147 interface ID2D1GradientMesh
: ID2D1Resource
149 UINT32 GetPatchCount
();
151 [in] UINT32 start_index
,
152 [out] D2D1_GRADIENT_MESH_PATCH
*patches
,
153 [in] UINT32 patch_count
159 uuid(c9b664e5
-74a1
-4378-9ac2
-eefc37a3f4d8
),
162 interface ID2D1ImageSource
: ID2D1Image
164 HRESULT OfferResources
();
165 HRESULT TryReclaimResources
(
166 [out] BOOL
*resources_discarded
172 uuid(77395441-1c8f
-4555-8683-f50dab0fe792
),
175 interface ID2D1ImageSourceFromWic
: ID2D1ImageSource
177 HRESULT EnsureCached
(
178 [in, optional] const D2D1_RECT_U
*rect_to_fill
181 [in, optional] const D2D1_RECT_U
*rect_to_preserve
184 [out] IWICBitmapSource
**source