6 * This file is part of the w32api package.
8 * THIS SOFTWARE IS NOT COPYRIGHTED
10 * This source code is offered for use in the public domain. You may
11 * use, modify or distribute it freely.
13 * This code is distributed in the hope that it will be useful but
14 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
15 * DISCLAIMED. This includes but is not limited to warranties of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 #ifndef _GDIPLUSTYPES_H
20 #define _GDIPLUSTYPES_H
23 #pragma GCC system_header
29 typedef BOOL (CALLBACK
* ImageAbort
)(VOID
*);
30 typedef ImageAbort DrawImageAbort
;
31 typedef ImageAbort GetThumbnailImageAbort
;
32 typedef BOOL (CALLBACK
* EnumerateMetafileProc
)(EmfPlusRecordType
, UINT
, UINT
, const BYTE
*, VOID
*);
41 InsufficientBuffer
= 5,
49 UnknownImageFormat
= 13,
50 FontFamilyNotFound
= 14,
51 FontStyleNotFound
= 15,
53 UnsupportedGdiplusVersion
= 17,
54 GdiplusNotInitialized
= 18,
55 PropertyNotFound
= 19,
56 PropertyNotSupported
= 20,
68 CharacterRange(INT first
, INT length
)
72 CharacterRange
&operator=(const CharacterRange
&rhs
)
92 SizeF(FLOAT width
, FLOAT height
)
96 SizeF(const SizeF
&size
)
105 BOOL
Equals(const SizeF
&sz
)
110 SizeF
operator+(const SizeF
&sz
)
112 return SizeF(Width
+ sz
.Width
,
116 SizeF
operator-(const SizeF
&sz
)
118 return SizeF(Width
- sz
.Width
,
131 PointF(REAL x
, REAL y
)
135 PointF(const SizeF
&size
)
143 PointF(const PointF
&point
)
147 BOOL
Equals(const PointF
& point
)
152 PointF
operator+(const PointF
&point
)
154 return PointF(X
+ point
.X
,
158 PointF
operator-(const PointF
&point
)
160 return PointF(X
- point
.X
,
191 Size(INT width
, INT height
)
195 Size(const Size
&size
)
204 BOOL
Equals(const Size
&sz
)
209 Size
operator+(const Size
&sz
)
211 return Size(Width
+ sz
.Width
,
215 Size
operator-(const Size
&sz
)
217 return Size(Width
- sz
.Width
,
238 Point(const Point
&point
)
242 Point(const Size
&size
)
246 BOOL
Equals(const Point
& point
)
251 Point
operator+(const Point
&point
)
253 return Point(X
+ point
.X
,
257 Point
operator-(const Point
&point
)
259 return Point(X
- point
.X
,
276 Rect(const Point
&location
, const Size
&size
)
280 Rect(INT x
, INT y
, INT width
, INT height
)
284 Rect
*Clone(VOID
) const
289 BOOL
Contains(const Point
& pt
)
294 BOOL
Contains(Rect
& rect
)
299 BOOL
Contains(INT x
, INT y
)
304 BOOL
Equals(const Rect
& rect
) const
309 INT
GetBottom(VOID
) const
314 VOID
GetBounds(Rect
* rect
) const
318 INT
GetLeft(VOID
) const
323 VOID
GetLocation(Point
* point
) const
327 INT
GetRight(VOID
) const
332 VOID
GetSize(Size
* size
) const
336 INT
GetTop(VOID
) const
341 VOID
Inflate(INT dx
, INT dy
)
345 VOID
Inflate(const Point
& point
)
349 BOOL
Intersect(Rect
& c
, const Rect
& a
, const Rect
& b
)
354 BOOL
Intersect(const Rect
& rect
)
359 BOOL
IntersectsWith(const Rect
& rect
) const
364 BOOL
IsEmptyArea(VOID
) const
369 VOID
Offset(INT dx
, INT dy
)
373 VOID
Offset(const Point
& point
)
377 BOOL
Union(Rect
& c
, const Rect
& a
, const Rect
& b
)
392 RectF(const PointF
&location
, const SizeF
&size
)
400 RectF(REAL x
, REAL y
, REAL width
, REAL height
)
404 RectF
*Clone(VOID
) const
409 BOOL
Contains(const RectF
& rect
)
414 BOOL
Contains(const PointF
& pt
) const
419 BOOL
Contains(REAL x
, REAL y
)
424 BOOL
Equals(const RectF
& rect
) const
429 REAL
GetBottom(VOID
) const
434 VOID
GetBounds(RectF
* rect
) const
438 REAL
GetLeft(VOID
) const
443 VOID
GetLocation(PointF
* point
) const
447 REAL
GetRight(VOID
) const
452 VOID
GetSize(SizeF
* size
) const
456 REAL
GetTop(VOID
) const
461 VOID
Inflate(const PointF
& point
)
465 VOID
Inflate(REAL dx
, REAL dy
)
469 BOOL
Intersect(Rect
& c
, const Rect
& a
, const Rect
& b
)
474 BOOL
Intersect(const Rect
& rect
)
479 BOOL
IntersectsWith(const RectF
& rect
) const
484 BOOL
IsEmptyArea(VOID
) const
489 VOID
Offset(INT dx
, INT dy
)
493 VOID
Offset(const Point
& point
)
497 BOOL
Union(RectF
& c
, const RectF
& a
, const RectF
& b
)
509 #endif /* _GDIPLUSTYPES_H */