]>
Commit | Line | Data |
---|---|---|
ff7c6d11 XL |
1 | // Copyright © 2015-2017 winapi-rs developers |
2 | // Licensed under the Apache License, Version 2.0 | |
3 | // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
4 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. | |
5 | // All files in the project carrying such notice may not be copied, modified, or distributed | |
6 | // except according to those terms. | |
8bb4bdeb | 7 | //! Mappings for the contents of dcommon.h |
8faf50e0 | 8 | use shared::basetsd::{UINT32}; |
ff7c6d11 | 9 | use shared::dxgiformat::DXGI_FORMAT; |
8faf50e0 XL |
10 | use shared::minwindef::{FLOAT}; |
11 | use shared::windef::{POINT, RECT}; | |
8bb4bdeb XL |
12 | ENUM!{enum DWRITE_MEASURING_MODE { |
13 | DWRITE_MEASURING_MODE_NATURAL = 0, | |
14 | DWRITE_MEASURING_MODE_GDI_CLASSIC = 1, | |
15 | DWRITE_MEASURING_MODE_GDI_NATURAL = 2, | |
16 | }} | |
8faf50e0 XL |
17 | ENUM!{enum DWRITE_GLYPH_IMAGE_FORMATS { |
18 | DWRITE_GLYPH_IMAGE_FORMATS_NONE = 0x00000000, | |
19 | DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE = 0x00000001, | |
20 | DWRITE_GLYPH_IMAGE_FORMATS_CFF = 0x00000002, | |
21 | DWRITE_GLYPH_IMAGE_FORMATS_COLR = 0x00000004, | |
22 | DWRITE_GLYPH_IMAGE_FORMATS_SVG = 0x00000008, | |
23 | DWRITE_GLYPH_IMAGE_FORMATS_PNG = 0x00000010, | |
24 | DWRITE_GLYPH_IMAGE_FORMATS_JPEG = 0x00000020, | |
25 | DWRITE_GLYPH_IMAGE_FORMATS_TIFF = 0x00000040, | |
26 | DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8 = 0x00000080, | |
27 | }} | |
8bb4bdeb XL |
28 | ENUM!{enum D2D1_ALPHA_MODE { |
29 | D2D1_ALPHA_MODE_UNKNOWN = 0, | |
30 | D2D1_ALPHA_MODE_PREMULTIPLIED = 1, | |
31 | D2D1_ALPHA_MODE_STRAIGHT = 2, | |
32 | D2D1_ALPHA_MODE_IGNORE = 3, | |
33 | }} | |
34 | STRUCT!{struct D2D1_PIXEL_FORMAT { | |
ff7c6d11 | 35 | format: DXGI_FORMAT, |
8bb4bdeb XL |
36 | alphaMode: D2D1_ALPHA_MODE, |
37 | }} | |
8faf50e0 XL |
38 | STRUCT!{struct D2D_POINT_2U { |
39 | x: UINT32, | |
40 | y: UINT32, | |
41 | }} | |
42 | STRUCT!{struct D2D_POINT_2F { | |
43 | x: FLOAT, | |
44 | y: FLOAT, | |
45 | }} | |
46 | pub type D2D_POINT_2L = POINT; | |
47 | STRUCT!{struct D2D_VECTOR_2F { | |
48 | x: FLOAT, | |
49 | y: FLOAT, | |
50 | }} | |
51 | STRUCT!{struct D2D_VECTOR_3F { | |
52 | x: FLOAT, | |
53 | y: FLOAT, | |
54 | z: FLOAT, | |
55 | }} | |
56 | STRUCT!{struct D2D_VECTOR_4F { | |
57 | x: FLOAT, | |
58 | y: FLOAT, | |
59 | z: FLOAT, | |
60 | w: FLOAT, | |
61 | }} | |
62 | STRUCT!{struct D2D_RECT_F { | |
63 | left: FLOAT, | |
64 | top: FLOAT, | |
65 | right: FLOAT, | |
66 | bottom: FLOAT, | |
67 | }} | |
68 | STRUCT!{struct D2D_RECT_U { | |
69 | left: UINT32, | |
70 | top: UINT32, | |
71 | right: UINT32, | |
72 | bottom: UINT32, | |
73 | }} | |
74 | pub type D2D_RECT_L = RECT; | |
75 | STRUCT!{struct D2D_SIZE_F { | |
76 | width: FLOAT, | |
77 | height: FLOAT, | |
78 | }} | |
79 | STRUCT!{struct D2D_SIZE_U { | |
80 | width: UINT32, | |
81 | height: UINT32, | |
82 | }} | |
83 | STRUCT!{struct D2D_MATRIX_3X2_F { | |
84 | matrix: [[FLOAT; 2]; 3], | |
85 | }} | |
86 | STRUCT!{struct D2D_MATRIX_4X3_F { | |
87 | matrix: [[FLOAT; 3]; 4], | |
88 | }} | |
89 | STRUCT!{struct D2D_MATRIX_4X4_F { | |
90 | matrix: [[FLOAT; 4]; 4], | |
91 | }} | |
92 | STRUCT!{struct D2D_MATRIX_5X4_F { | |
93 | matrix: [[FLOAT; 4]; 5], | |
94 | }} | |
95 | pub type D2D1_POINT_2F = D2D_POINT_2F; | |
96 | pub type D2D1_POINT_2U = D2D_POINT_2U; | |
97 | pub type D2D1_POINT_2L = D2D_POINT_2L; | |
98 | pub type D2D1_RECT_F = D2D_RECT_F; | |
99 | pub type D2D1_RECT_U = D2D_RECT_U; | |
100 | pub type D2D1_RECT_L = D2D_RECT_L; | |
101 | pub type D2D1_SIZE_F = D2D_SIZE_F; | |
102 | pub type D2D1_SIZE_U = D2D_SIZE_U; | |
103 | pub type D2D1_MATRIX_3X2_F = D2D_MATRIX_3X2_F; |