ReactOS 0.4.15-dev-8390-g075894b
gdiplusmetaheader.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2007 Google (Evan Stade)
3 *
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.
8 *
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.
13 *
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
17 */
18
19#ifndef _GDIPLUSMETAHEADER_H
20#define _GDIPLUSMETAHEADER_H
21
22typedef struct
23{
40
41#include <pshpack2.h>
42
43typedef struct
44{
50
51typedef struct
52{
60
61#include <poppack.h>
62
63#define GDIP_EMFPLUSFLAGS_DISPLAY 0x00000001
64
65#ifdef __cplusplus
67{
68 public:
70 UINT Size;
73 REAL DpiX;
74 REAL DpiY;
75 INT X;
76 INT Y;
77 INT Width;
78 INT Height;
79 union {
82 };
86
87 public:
89 GetType() const
90 {
91 return Type;
92 }
93
94 UINT
95 GetMetafileSize() const
96 {
97 return Size;
98 }
99
100 UINT
101 GetVersion() const
102 {
103 return Version;
104 }
105
106 UINT
107 GetEmfPlusFlags() const
108 {
109 return EmfPlusFlags;
110 }
111
112 REAL
113 GetDpiX() const
114 {
115 return DpiX;
116 }
117
118 REAL
119 GetDpiY() const
120 {
121 return DpiY;
122 }
123
124 VOID
125 GetBounds(OUT Rect *r) const
126 {
127 r->X = X;
128 r->Y = Y;
129 r->Width = Width;
130 r->Height = Height;
131 }
132
133 BOOL
134 IsWmf() const
135 {
137 }
138
139 BOOL
140 IsWmfPlaceable() const
141 {
142 return (Type == MetafileTypeWmfPlaceable);
143 }
144
145 BOOL
146 IsEmf() const
147 {
148 return (Type == MetafileTypeEmf);
149 }
150
151 BOOL
152 IsEmfOrEmfPlus() const
153 {
154 return (Type >= MetafileTypeEmf);
155 }
156
157 BOOL
158 IsEmfPlus() const
159 {
160 return (Type >= MetafileTypeEmfPlusOnly);
161 }
162
163 BOOL
164 IsEmfPlusDual() const
165 {
166 return (Type == MetafileTypeEmfPlusDual);
167 }
168
169 BOOL
170 IsEmfPlusOnly() const
171 {
172 return (Type == MetafileTypeEmfPlusOnly);
173 }
174
175 BOOL
176 IsDisplay() const
177 {
178 return IsEmfPlus() && ((EmfPlusFlags & GDIP_EMFPLUSFLAGS_DISPLAY) != 0);
179 }
180
181 const METAHEADER *
182 GetWmfHeader() const
183 {
184 return IsWmf() ? &WmfHeader : NULL;
185 }
186
187 const ENHMETAHEADER3 *
188 GetEmfHeader() const
189 {
190 return IsEmfOrEmfPlus() ? &EmfHeader : NULL;
191 }
192};
193#else /* end of c++ typedefs */
194
195typedef struct MetafileHeader
196{
207 union {
215
216#endif /* end of c typedefs */
217
218#endif /* _GDIPLUSMETAHEADER_H */
signed short INT16
unsigned int UINT32
Type
Definition: Type.h:7
#define NULL
Definition: types.h:112
float REAL
Definition: types.h:41
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
MetafileType
Definition: gdiplusenums.h:215
@ MetafileTypeEmfPlusOnly
Definition: gdiplusenums.h:220
@ MetafileTypeWmf
Definition: gdiplusenums.h:217
@ MetafileTypeWmfPlaceable
Definition: gdiplusenums.h:218
@ MetafileTypeEmf
Definition: gdiplusenums.h:219
@ MetafileTypeEmfPlusDual
Definition: gdiplusenums.h:221
#define GDIP_EMFPLUSFLAGS_DISPLAY
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
unsigned int UINT
Definition: ndis.h:50
DWORD WINAPI GetVersion()
Definition: redirtest.c:5
MetafileType Type
union MetafileHeader::@2967 DUMMYUNIONNAME
ENHMETAHEADER3 EmfHeader
METAHEADER WmfHeader
int32_t INT
Definition: typedefs.h:58
#define OUT
Definition: typedefs.h:40
#define GetType(This)
Definition: conio.h:54