RetroArch
dcommon.h
Go to the documentation of this file.
1 //+--------------------------------------------------------------------------
2 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 //
5 // Abstract:
6 // Public API definitions shared by DWrite, D2D, and DImage.
7 //
8 //----------------------------------------------------------------------------
9 #pragma once
10 
11 #ifndef DCOMMON_H_INCLUDED
12 #define DCOMMON_H_INCLUDED
13 
14 #include <dxgiformat.h>
15 
16 #ifndef DX_DECLARE_INTERFACE
17 #define DX_DECLARE_INTERFACE(x) DECLSPEC_UUID(x) DECLSPEC_NOVTABLE
18 #endif
19 
20 #ifndef CHECKMETHOD
21 #define CHECKMETHOD(method) virtual DECLSPEC_NOTHROW _Must_inspect_result_ HRESULT STDMETHODCALLTYPE method
22 #endif
23 
24 #pragma warning(push)
25 #pragma warning(disable:4201) // anonymous unions warning
26 
27 //
28 // Forward declarations
29 //
30 struct IDXGISurface;
31 
36 {
41 
46 
48  // Text is measured using the same glyph display metrics as text measured by GDI using a font
49  // created with CLEARTYPE_NATURAL_QUALITY.
52 
54 
55 #if NTDDI_VERSION >= NTDDI_WIN10_RS1
56 
63 {
68 
73 
78 
83 
92 
97 
102 
107 
112 };
113 
114 #ifdef DEFINE_ENUM_FLAG_OPERATORS
116 #endif
117 
118 #endif
119 
124 typedef enum D2D1_ALPHA_MODE
125 {
126 
132 
137 
142 
147 
149 
151 
155 typedef struct D2D1_PIXEL_FORMAT
156 {
159 
161 
165 typedef struct D2D_POINT_2U
166 {
169 
170 } D2D_POINT_2U;
171 
175 typedef struct D2D_POINT_2F
176 {
179 
180 } D2D_POINT_2F;
181 
182 typedef POINT D2D_POINT_2L;
183 
187 typedef struct D2D_VECTOR_2F
188 {
191 
192 } D2D_VECTOR_2F;
193 
194 
198 typedef struct D2D_VECTOR_3F
199 {
203 
204 } D2D_VECTOR_3F;
205 
206 
210 typedef struct D2D_VECTOR_4F
211 {
216 
217 } D2D_VECTOR_4F;
218 
219 
224 typedef struct D2D_RECT_F
225 {
230 
231 } D2D_RECT_F;
232 
233 
238 typedef struct D2D_RECT_U
239 {
244 
245 } D2D_RECT_U;
246 
247 typedef RECT D2D_RECT_L;
248 
252 typedef struct D2D_SIZE_F
253 {
256 
257 } D2D_SIZE_F;
258 
259 
264 typedef struct D2D_SIZE_U
265 {
268 
269 } D2D_SIZE_U;
270 
271 
275 typedef struct D2D_MATRIX_3X2_F
276 {
277  union
278  {
279  struct
280  {
285 
290 
295 
300 
305 
310  };
311 
312  struct
313  {
317  };
318 
319  FLOAT m[3][2];
320  };
321 
323 
324 
325 
329 typedef struct D2D_MATRIX_4X3_F
330 {
331  union
332  {
333  struct
334  {
339  };
340 
341  FLOAT m[4][3];
342  };
343 
345 
346 
350 typedef struct D2D_MATRIX_4X4_F
351 {
352  union
353  {
354  struct
355  {
360  };
361 
362  FLOAT m[4][4];
363  };
364 
366 
367 
371 typedef struct D2D_MATRIX_5X4_F
372 {
373  union
374  {
375  struct
376  {
382  };
383 
384  FLOAT m[5][4];
385  };
386 
388 
389 
399 
400 
401 #pragma warning(pop)
402 
403 #endif /* DCOMMON_H_INCLUDED */
FLOAT _41
Definition: dcommon.h:380
FLOAT y
Definition: dcommon.h:178
FLOAT _13
Definition: dcommon.h:356
FLOAT _31
Definition: dcommon.h:358
FLOAT _34
Definition: dcommon.h:379
The glyph has PNG image data, with standard PNG IHDR.
Definition: dcommon.h:96
FLOAT _33
Definition: dcommon.h:337
D2D_RECT_F D2D1_RECT_F
Definition: dcommon.h:393
D2D_RECT_L D2D1_RECT_L
Definition: dcommon.h:395
UINT32 left
Definition: dcommon.h:240
FLOAT _42
Definition: dcommon.h:359
UINT32 right
Definition: dcommon.h:242
FLOAT _54
Definition: dcommon.h:381
FLOAT _22
Definition: dcommon.h:336
Definition: glslang_tab.cpp:129
FLOAT w
Definition: dcommon.h:215
FLOAT _53
Definition: dcommon.h:381
FLOAT _14
Definition: dcommon.h:356
D2D_POINT_2U D2D1_POINT_2U
Definition: dcommon.h:391
DXGI_FORMAT format
Definition: dcommon.h:157
struct D2D_VECTOR_2F D2D_VECTOR_2F
A vector of 2 FLOAT values (x, y).
FLOAT _41
Definition: dcommon.h:338
FLOAT _21
Definition: dcommon.h:357
FLOAT _12
Definition: dcommon.h:335
Represents an x-coordinate and y-coordinate pair in two-dimensional space.
Definition: dcommon.h:165
The glyph has TrueType outlines.
Definition: dcommon.h:72
UINT32 height
Definition: dcommon.h:267
FLOAT _43
Definition: dcommon.h:380
The glyph has raw 32-bit premultiplied BGRA data.
Definition: dcommon.h:111
UINT32 top
Definition: dcommon.h:241
FLOAT _21
Definition: dcommon.h:315
FLOAT _12
Definition: dcommon.h:356
Text is measured using glyph display compatible metrics whose values tuned for the current display re...
Definition: dcommon.h:45
FLOAT dy
Vertical shift (always orthogonal regardless of rotation)
Definition: dcommon.h:309
struct D2D1_PIXEL_FORMAT D2D1_PIXEL_FORMAT
Description of a pixel format.
FLOAT y
Definition: dcommon.h:190
FLOAT _42
Definition: dcommon.h:338
struct D2D_MATRIX_5X4_F D2D_MATRIX_5X4_F
Represents a 5-by-4 matrix.
The glyph has SVG outlines as standard XML.
Definition: dcommon.h:91
FLOAT _52
Definition: dcommon.h:381
Represents a rectangle defined by the coordinates of the upper-left corner (left, top) and the coordi...
Definition: dcommon.h:224
D2D_RECT_U D2D1_RECT_U
Definition: dcommon.h:394
D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F
Definition: dcommon.h:398
FLOAT _12
Definition: dcommon.h:377
FLOAT _23
Definition: dcommon.h:357
FLOAT z
Definition: dcommon.h:202
FLOAT x
Definition: dcommon.h:212
FLOAT _22
Definition: dcommon.h:357
FLOAT dx
Horizontal shift (always orthogonal regardless of rotation)
Definition: dcommon.h:304
FLOAT y
Definition: dcommon.h:213
FLOAT _31
Definition: dcommon.h:316
struct D2D_RECT_F D2D_RECT_F
Represents a rectangle defined by the coordinates of the upper-left corner (left, top) and the coordi...
Alpha mode should be determined implicitly. Some target surfaces do not supply or imply this informat...
Definition: dcommon.h:131
struct D2D_MATRIX_4X4_F D2D_MATRIX_4X4_F
Represents a 4-by-4 matrix.
The glyph has TIFF image data.
Definition: dcommon.h:106
FLOAT _13
Definition: dcommon.h:377
Represents a 5-by-4 matrix.
Definition: dcommon.h:371
struct D2D_MATRIX_3X2_F D2D_MATRIX_3X2_F
Represents a 3-by-2 matrix.
FLOAT y
Definition: dcommon.h:201
FLOAT _14
Definition: dcommon.h:377
FLOAT _51
Definition: dcommon.h:381
Treat the alpha as premultipled.
Definition: dcommon.h:136
FLOAT _22
Definition: dcommon.h:378
DWRITE_GLYPH_IMAGE_FORMATS
Fonts may contain multiple drawable data formats for glyphs. These flags specify which formats are su...
Definition: dcommon.h:62
DXGI_FORMAT
Definition: dxgiformat.h:10
FLOAT x
Definition: dcommon.h:177
FLOAT _23
Definition: dcommon.h:336
FLOAT _24
Definition: dcommon.h:357
The glyph has multilayered COLR data.
Definition: dcommon.h:82
interface IDXGISurface IDXGISurface
Definition: d2d1.h:53
struct D2D_MATRIX_4X3_F D2D_MATRIX_4X3_F
Represents a 4-by-3 matrix.
A vector of 2 FLOAT values (x, y).
Definition: dcommon.h:187
The glyph has JPEG image data, with standard JIFF SOI header.
Definition: dcommon.h:101
struct D2D_SIZE_U D2D_SIZE_U
Stores an ordered pair of integers, typically the width and height of a rectangle.
Description of a pixel format.
Definition: dcommon.h:155
Definition: dcommon.h:51
struct D2D_SIZE_F D2D_SIZE_F
Stores an ordered pair of floats, typically the width and height of a rectangle.
FLOAT _23
Definition: dcommon.h:378
FLOAT _44
Definition: dcommon.h:380
FLOAT m12
Vertical shear / sine of rotation
Definition: dcommon.h:289
FLOAT _32
Definition: dcommon.h:379
struct D2D_VECTOR_4F D2D_VECTOR_4F
A vector of 4 FLOAT values (x, y, z, w).
Ignore any alpha channel information.
Definition: dcommon.h:146
RECT D2D_RECT_L
Definition: dcommon.h:247
FLOAT x
Definition: dcommon.h:189
Stores an ordered pair of floats, typically the width and height of a rectangle.
Definition: dcommon.h:252
D2D1_ALPHA_MODE alphaMode
Definition: dcommon.h:158
FLOAT _43
Definition: dcommon.h:359
struct D2D_RECT_U D2D_RECT_U
Represents a rectangle defined by the coordinates of the upper-left corner (left, top) and the coordi...
FLOAT _41
Definition: dcommon.h:359
FLOAT _22
Definition: dcommon.h:315
A vector of 4 FLOAT values (x, y, z, w).
Definition: dcommon.h:210
FLOAT m21
Horizontal shear / negative sine of rotation
Definition: dcommon.h:294
Represents an x-coordinate and y-coordinate pair in two-dimensional space.
Definition: dcommon.h:175
D2D1_ALPHA_MODE
Qualifies how alpha is to be treated in a bitmap or render target containing alpha.
Definition: dcommon.h:124
UINT32 y
Definition: dcommon.h:168
FLOAT _13
Definition: dcommon.h:335
FLOAT _33
Definition: dcommon.h:379
struct D2D_POINT_2U D2D_POINT_2U
Represents an x-coordinate and y-coordinate pair in two-dimensional space.
D2D_POINT_2L D2D1_POINT_2L
Definition: dcommon.h:392
FLOAT height
Definition: dcommon.h:255
FLOAT _21
Definition: dcommon.h:336
Represents a 3-by-2 matrix.
Definition: dcommon.h:275
FLOAT top
Definition: dcommon.h:227
FLOAT _11
Definition: dcommon.h:377
The glyph has CFF outlines.
Definition: dcommon.h:77
Represents a rectangle defined by the coordinates of the upper-left corner (left, top) and the coordi...
Definition: dcommon.h:238
FLOAT m11
Horizontal scaling / cosine of rotation
Definition: dcommon.h:284
D2D_POINT_2F D2D1_POINT_2F
Definition: dcommon.h:390
A vector of 3 FLOAT values (x, y, z).
Definition: dcommon.h:198
FLOAT x
Definition: dcommon.h:200
Opacity is in the 'A' component only.
Definition: dcommon.h:141
Text is measured using glyph ideal metrics whose values are independent to the current display resolu...
Definition: dcommon.h:40
uint32_t UINT32
Definition: coretypes.h:10
FLOAT _21
Definition: dcommon.h:378
FLOAT _11
Definition: dcommon.h:356
Definition: dcommon.h:148
FLOAT width
Definition: dcommon.h:254
UINT32 x
Definition: dcommon.h:167
UINT32 width
Definition: dcommon.h:266
D2D_SIZE_F D2D1_SIZE_F
Definition: dcommon.h:396
FLOAT _11
Definition: dcommon.h:314
FLOAT _34
Definition: dcommon.h:358
Stores an ordered pair of integers, typically the width and height of a rectangle.
Definition: dcommon.h:264
struct D2D_VECTOR_3F D2D_VECTOR_3F
A vector of 3 FLOAT values (x, y, z).
FLOAT _44
Definition: dcommon.h:359
FLOAT _33
Definition: dcommon.h:358
FLOAT bottom
Definition: dcommon.h:229
D2D_SIZE_U D2D1_SIZE_U
Definition: dcommon.h:397
struct D2D_POINT_2F D2D_POINT_2F
Represents an x-coordinate and y-coordinate pair in two-dimensional space.
DEFINE_ENUM_FLAG_OPERATORS(D2D1_DRAW_TEXT_OPTIONS)
Represents a 4-by-4 matrix.
Definition: dcommon.h:350
FLOAT _24
Definition: dcommon.h:378
FLOAT _32
Definition: dcommon.h:316
FLOAT _31
Definition: dcommon.h:379
FLOAT _12
Definition: dcommon.h:314
Represents a 4-by-3 matrix.
Definition: dcommon.h:329
FLOAT _32
Definition: dcommon.h:337
FLOAT right
Definition: dcommon.h:228
FLOAT m22
Vertical scaling / cosine of rotation
Definition: dcommon.h:299
FLOAT _32
Definition: dcommon.h:358
FLOAT _31
Definition: dcommon.h:337
POINT D2D_POINT_2L
Definition: dcommon.h:182
UINT32 bottom
Definition: dcommon.h:243
FLOAT left
Definition: dcommon.h:226
Indicates no data is available for this glyph.
Definition: dcommon.h:67
const GLfloat * m
Definition: glext.h:11755
FLOAT _42
Definition: dcommon.h:380
FLOAT z
Definition: dcommon.h:214
DWRITE_MEASURING_MODE
The measuring method used for text layout.
Definition: dcommon.h:35
FLOAT _43
Definition: dcommon.h:338
FLOAT _11
Definition: dcommon.h:335