ReactOS 0.4.16-dev-125-g798ea90
Region Class Reference

#include <gdiplusheaders.h>

Inheritance diagram for Region:
Collaboration diagram for Region:

Public Member Functions

 Region (const Rect &rect)
 
 Region ()
 
 Region (const BYTE *regionData, INT size)
 
 Region (const GraphicsPath *path)
 
 Region (HRGN hRgn)
 
 Region (const RectF &rect)
 
RegionClone ()
 
Status Complement (const GraphicsPath *path)
 
Status Complement (const Region *region)
 
Status Complement (const Rect &rect)
 
Status Complement (const RectF &rect)
 
BOOL Equals (const Region *region, const Graphics *g) const
 
Status Exclude (const GraphicsPath *path)
 
Status Exclude (const RectF &rect)
 
Status Exclude (const Rect &rect)
 
Status Exclude (const Region *region)
 
Status GetBounds (Rect *rect, const Graphics *g) const
 
Status GetBounds (RectF *rect, const Graphics *g) const
 
Status GetData (BYTE *buffer, UINT bufferSize, UINT *sizeFilled) const
 
UINT GetDataSize () const
 
HRGN GetHRGN (const Graphics *g) const
 
Status GetLastStatus ()
 
Status GetRegionScans (const Matrix *matrix, Rect *rects, INT *count) const
 
Status GetRegionScans (const Matrix *matrix, RectF *rects, INT *count) const
 
UINT GetRegionScansCount (const Matrix *matrix) const
 
Status Intersect (const Rect &rect)
 
Status Intersect (const GraphicsPath *path)
 
Status Intersect (const RectF &rect)
 
Status Intersect (const Region *region)
 
BOOL IsEmpty (const Graphics *g) const
 
BOOL IsInfinite (const Graphics *g) const
 
BOOL IsVisible (const PointF &point, const Graphics *g) const
 
BOOL IsVisible (const RectF &rect, const Graphics *g) const
 
BOOL IsVisible (const Rect &rect, const Graphics *g) const
 
BOOL IsVisible (INT x, INT y, const Graphics *g) const
 
BOOL IsVisible (REAL x, REAL y, const Graphics *g) const
 
BOOL IsVisible (INT x, INT y, INT width, INT height, const Graphics *g) const
 
BOOL IsVisible (const Point &point, const Graphics *g) const
 
BOOL IsVisible (REAL x, REAL y, REAL width, REAL height, const Graphics *g) const
 
Status MakeEmpty ()
 
Status MakeInfinite ()
 
Status Transform (const Matrix *matrix)
 
Status Translate (REAL dx, REAL dy)
 
Status Translate (INT dx, INT dy)
 
Status Union (const Rect &rect)
 
Status Union (const Region *region)
 
Status Union (const RectF &rect)
 
Status Union (const GraphicsPath *path)
 
Status Xor (const GraphicsPath *path)
 
Status Xor (const RectF &rect)
 
Status Xor (const Rect &rect)
 
Status Xor (const Region *region)
 
- Public Member Functions inherited from GdiplusBase
void operator delete (void *in_pVoid)
 
void operator delete[] (void *in_pVoid)
 
voidoperator new (size_t in_size)
 
voidoperator new[] (size_t in_size)
 

Static Public Member Functions

static RegionFromHRGN (HRGN hRgn)
 

Private Member Functions

Status SetStatus (Status status) const
 

Private Attributes

GpRegionnativeRegion
 
Status lastStatus
 

Friends

class Graphics
 
class GraphicsPath
 
class Matrix
 
GpRegion *& getNat (const Region *region)
 

Detailed Description

Definition at line 1012 of file gdiplusheaders.h.

Constructor & Destructor Documentation

◆ Region() [1/6]

Region::Region ( const Rect rect)
inline

Definition at line 1019 of file gdiplusheaders.h.

1020 {
1021 lastStatus = DllExports::GdipCreateRegionRectI(&rect, &nativeRegion);
1022 }
GpRegion * nativeRegion
Status lastStatus
& rect
Definition: startmenu.cpp:1413

◆ Region() [2/6]

Region::Region ( )
inline

Definition at line 1024 of file gdiplusheaders.h.

1025 {
1026 lastStatus = DllExports::GdipCreateRegion(&nativeRegion);
1027 }

Referenced by Clone(), and FromHRGN().

◆ Region() [3/6]

Region::Region ( const BYTE regionData,
INT  size 
)
inline

Definition at line 1029 of file gdiplusheaders.h.

1030 {
1031 lastStatus = DllExports::GdipCreateRegionRgnData(regionData, size, &nativeRegion);
1032 }
GLsizeiptr size
Definition: glext.h:5919

◆ Region() [4/6]

Region::Region ( const GraphicsPath path)
inline

Definition at line 1034 of file gdiplusheaders.h.

1035 {
1036 lastStatus = DllExports::GdipCreateRegionPath(getNat(path), &nativeRegion);
1037 }
friend GpRegion *& getNat(const Region *region)

◆ Region() [5/6]

Region::Region ( HRGN  hRgn)
inline

Definition at line 1039 of file gdiplusheaders.h.

1040 {
1041 lastStatus = DllExports::GdipCreateRegionHrgn(hRgn, &nativeRegion);
1042 }
static HRGN hRgn
Definition: mapping.c:33

◆ Region() [6/6]

Region::Region ( const RectF rect)
inline

Definition at line 1044 of file gdiplusheaders.h.

1045 {
1046 lastStatus = DllExports::GdipCreateRegionRect(&rect, &nativeRegion);
1047 }

Member Function Documentation

◆ Clone()

Region * Region::Clone ( )
inline

Definition at line 1050 of file gdiplusheaders.h.

1051 {
1052 Region *cloneRegion = new Region();
1053 cloneRegion->lastStatus =
1054 DllExports::GdipCloneRegion(nativeRegion, cloneRegion ? &cloneRegion->nativeRegion : NULL);
1055 return cloneRegion;
1056 }
#define NULL
Definition: types.h:112

◆ Complement() [1/4]

Status Region::Complement ( const GraphicsPath path)
inline

Definition at line 1059 of file gdiplusheaders.h.

1060 {
1061 GpPath *thePath = path ? getNat(path) : NULL;
1062 return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, thePath, CombineModeComplement));
1063 }
Status SetStatus(Status status) const
@ CombineModeComplement
Definition: gdiplusenums.h:356

◆ Complement() [2/4]

Status Region::Complement ( const Rect rect)
inline

Definition at line 1073 of file gdiplusheaders.h.

1074 {
1075 return SetStatus(DllExports::GdipCombineRegionRectI(nativeRegion, &rect, CombineModeComplement));
1076 }

◆ Complement() [3/4]

Status Region::Complement ( const RectF rect)
inline

Definition at line 1079 of file gdiplusheaders.h.

1080 {
1081 return SetStatus(DllExports::GdipCombineRegionRect(nativeRegion, &rect, CombineModeComplement));
1082 }

◆ Complement() [4/4]

Status Region::Complement ( const Region region)
inline

Definition at line 1066 of file gdiplusheaders.h.

1067 {
1068 GpRegion *theRegion = region ? getNat(region) : NULL;
1069 return SetStatus(DllExports::GdipCombineRegionRegion(nativeRegion, theRegion, CombineModeComplement));
1070 }

◆ Equals()

BOOL Region::Equals ( const Region region,
const Graphics g 
) const
inline

Definition at line 1085 of file gdiplusheaders.h.

1086 {
1087 BOOL result;
1088 SetStatus(
1089 DllExports::GdipIsEqualRegion(nativeRegion, region ? getNat(region) : NULL, g ? getNat(g) : NULL, &result));
1090 return result;
1091 }
unsigned int BOOL
Definition: ntddk_ex.h:94
GLboolean GLboolean g
Definition: glext.h:6204
GLuint64EXT * result
Definition: glext.h:11304

◆ Exclude() [1/4]

Status Region::Exclude ( const GraphicsPath path)
inline

Definition at line 1094 of file gdiplusheaders.h.

1095 {
1096 return SetStatus(
1097 DllExports::GdipCombineRegionPath(nativeRegion, path ? getNat(path) : NULL, CombineModeExclude));
1098 }
@ CombineModeExclude
Definition: gdiplusenums.h:355

◆ Exclude() [2/4]

Status Region::Exclude ( const Rect rect)
inline

Definition at line 1107 of file gdiplusheaders.h.

1108 {
1109 return SetStatus(DllExports::GdipCombineRegionRectI(nativeRegion, &rect, CombineModeExclude));
1110 }

◆ Exclude() [3/4]

Status Region::Exclude ( const RectF rect)
inline

Definition at line 1101 of file gdiplusheaders.h.

1102 {
1103 return SetStatus(DllExports::GdipCombineRegionRect(nativeRegion, &rect, CombineModeExclude));
1104 }

◆ Exclude() [4/4]

Status Region::Exclude ( const Region region)
inline

Definition at line 1113 of file gdiplusheaders.h.

1114 {
1115 return SetStatus(
1116 DllExports::GdipCombineRegionRegion(nativeRegion, region ? getNat(region) : NULL, CombineModeExclude));
1117 }

◆ FromHRGN()

static Region * Region::FromHRGN ( HRGN  hRgn)
inlinestatic

Definition at line 1120 of file gdiplusheaders.h.

1121 {
1122 return new Region(hRgn);
1123 }

◆ GetBounds() [1/2]

Status Region::GetBounds ( Rect rect,
const Graphics g 
) const
inline

Definition at line 1126 of file gdiplusheaders.h.

1127 {
1128 return SetStatus(DllExports::GdipGetRegionBoundsI(nativeRegion, g ? getNat(g) : NULL, rect));
1129 }

◆ GetBounds() [2/2]

Status Region::GetBounds ( RectF rect,
const Graphics g 
) const
inline

Definition at line 1132 of file gdiplusheaders.h.

1133 {
1134 return SetStatus(DllExports::GdipGetRegionBounds(nativeRegion, g ? getNat(g) : NULL, rect));
1135 }

◆ GetData()

Status Region::GetData ( BYTE buffer,
UINT  bufferSize,
UINT sizeFilled 
) const
inline

Definition at line 1138 of file gdiplusheaders.h.

1139 {
1140 return SetStatus(DllExports::GdipGetRegionData(nativeRegion, buffer, bufferSize, sizeFilled));
1141 }
size_t bufferSize
GLuint buffer
Definition: glext.h:5915

◆ GetDataSize()

UINT Region::GetDataSize ( ) const
inline

Definition at line 1144 of file gdiplusheaders.h.

1145 {
1147 SetStatus(DllExports::GdipGetRegionDataSize(nativeRegion, &bufferSize));
1148 return bufferSize;
1149 }
unsigned int UINT
Definition: ndis.h:50

◆ GetHRGN()

HRGN Region::GetHRGN ( const Graphics g) const
inline

Definition at line 1152 of file gdiplusheaders.h.

1153 {
1154 HRGN hRgn;
1155 SetStatus(DllExports::GdipGetRegionHRgn(nativeRegion, g ? getNat(g) : NULL, &hRgn));
1156 return hRgn;
1157 }

◆ GetLastStatus()

Status Region::GetLastStatus ( )
inline

Definition at line 1160 of file gdiplusheaders.h.

1161 {
1162 return lastStatus;
1163 }

◆ GetRegionScans() [1/2]

Status Region::GetRegionScans ( const Matrix matrix,
Rect rects,
INT count 
) const
inline

Definition at line 1166 of file gdiplusheaders.h.

1167 {
1168 return SetStatus(DllExports::GdipGetRegionScansI(nativeRegion, rects, count, matrix ? getNat(matrix) : NULL));
1169 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLenum matrix
Definition: glext.h:9407

◆ GetRegionScans() [2/2]

Status Region::GetRegionScans ( const Matrix matrix,
RectF rects,
INT count 
) const
inline

Definition at line 1172 of file gdiplusheaders.h.

1173 {
1174 return SetStatus(DllExports::GdipGetRegionScans(nativeRegion, rects, count, matrix ? getNat(matrix) : NULL));
1175 }

◆ GetRegionScansCount()

UINT Region::GetRegionScansCount ( const Matrix matrix) const
inline

Definition at line 1178 of file gdiplusheaders.h.

1179 {
1180 UINT count;
1181 SetStatus(DllExports::GdipGetRegionScansCount(nativeRegion, &count, matrix ? getNat(matrix) : NULL));
1182 return count;
1183 }

◆ Intersect() [1/4]

Status Region::Intersect ( const GraphicsPath path)
inline

Definition at line 1192 of file gdiplusheaders.h.

1193 {
1194 GpPath *thePath = path ? getNat(path) : NULL;
1195 return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, thePath, CombineModeIntersect));
1196 }
@ CombineModeIntersect
Definition: gdiplusenums.h:352

◆ Intersect() [2/4]

Status Region::Intersect ( const Rect rect)
inline

Definition at line 1186 of file gdiplusheaders.h.

1187 {
1188 return SetStatus(DllExports::GdipCombineRegionRectI(nativeRegion, &rect, CombineModeIntersect));
1189 }

◆ Intersect() [3/4]

Status Region::Intersect ( const RectF rect)
inline

Definition at line 1199 of file gdiplusheaders.h.

1200 {
1201 return SetStatus(DllExports::GdipCombineRegionRect(nativeRegion, &rect, CombineModeIntersect));
1202 }

◆ Intersect() [4/4]

Status Region::Intersect ( const Region region)
inline

Definition at line 1205 of file gdiplusheaders.h.

1206 {
1207 return SetStatus(
1208 DllExports::GdipCombineRegionRegion(nativeRegion, region ? getNat(region) : NULL, CombineModeIntersect));
1209 }

◆ IsEmpty()

BOOL Region::IsEmpty ( const Graphics g) const
inline

Definition at line 1212 of file gdiplusheaders.h.

1213 {
1214 BOOL result;
1215 SetStatus(DllExports::GdipIsEmptyRegion(nativeRegion, g ? getNat(g) : NULL, &result));
1216 return result;
1217 }

◆ IsInfinite()

BOOL Region::IsInfinite ( const Graphics g) const
inline

Definition at line 1220 of file gdiplusheaders.h.

1221 {
1222 BOOL result;
1223 SetStatus(DllExports::GdipIsInfiniteRegion(nativeRegion, g ? getNat(g) : NULL, &result));
1224 return result;
1225 }

◆ IsVisible() [1/8]

BOOL Region::IsVisible ( const Point point,
const Graphics g 
) const
inline

Definition at line 1279 of file gdiplusheaders.h.

1280 {
1281 BOOL result;
1282 SetStatus(DllExports::GdipIsVisibleRegionPointI(nativeRegion, point.X, point.Y, g ? getNat(g) : NULL, &result));
1283 return result;
1284 }
POINTL point
Definition: edittest.c:50

◆ IsVisible() [2/8]

BOOL Region::IsVisible ( const PointF point,
const Graphics g 
) const
inline

Definition at line 1228 of file gdiplusheaders.h.

1229 {
1230 BOOL result;
1231 SetStatus(DllExports::GdipIsVisibleRegionPoint(nativeRegion, point.X, point.Y, g ? getNat(g) : NULL, &result));
1232 return result;
1233 }

◆ IsVisible() [3/8]

BOOL Region::IsVisible ( const Rect rect,
const Graphics g 
) const
inline

Definition at line 1245 of file gdiplusheaders.h.

1246 {
1247 BOOL result;
1248 SetStatus(DllExports::GdipIsVisibleRegionRectI(
1249 nativeRegion, rect.X, rect.Y, rect.Width, rect.Height, g ? getNat(g) : NULL, &result));
1250 return result;
1251 }

◆ IsVisible() [4/8]

BOOL Region::IsVisible ( const RectF rect,
const Graphics g 
) const
inline

Definition at line 1236 of file gdiplusheaders.h.

1237 {
1238 BOOL result;
1239 SetStatus(DllExports::GdipIsVisibleRegionRect(
1240 nativeRegion, rect.X, rect.Y, rect.Width, rect.Height, g ? getNat(g) : NULL, &result));
1241 return result;
1242 }

◆ IsVisible() [5/8]

BOOL Region::IsVisible ( INT  x,
INT  y,
const Graphics g 
) const
inline

Definition at line 1254 of file gdiplusheaders.h.

1255 {
1256 BOOL result;
1257 SetStatus(DllExports::GdipIsVisibleRegionPointI(nativeRegion, x, y, g ? getNat(g) : NULL, &result));
1258 return result;
1259 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ IsVisible() [6/8]

BOOL Region::IsVisible ( INT  x,
INT  y,
INT  width,
INT  height,
const Graphics g 
) const
inline

Definition at line 1270 of file gdiplusheaders.h.

1271 {
1272 BOOL result;
1273 SetStatus(
1274 DllExports::GdipIsVisibleRegionRectI(nativeRegion, x, y, width, height, g ? getNat(g) : NULL, &result));
1275 return result;
1276 }
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546

◆ IsVisible() [7/8]

BOOL Region::IsVisible ( REAL  x,
REAL  y,
const Graphics g 
) const
inline

Definition at line 1262 of file gdiplusheaders.h.

1263 {
1264 BOOL result;
1265 SetStatus(DllExports::GdipIsVisibleRegionPoint(nativeRegion, x, y, g ? getNat(g) : NULL, &result));
1266 return result;
1267 }

◆ IsVisible() [8/8]

BOOL Region::IsVisible ( REAL  x,
REAL  y,
REAL  width,
REAL  height,
const Graphics g 
) const
inline

Definition at line 1287 of file gdiplusheaders.h.

1288 {
1289 BOOL result;
1290 SetStatus(
1291 DllExports::GdipIsVisibleRegionRect(nativeRegion, x, y, width, height, g ? getNat(g) : NULL, &result));
1292 return result;
1293 }

◆ MakeEmpty()

Status Region::MakeEmpty ( )
inline

Definition at line 1296 of file gdiplusheaders.h.

1297 {
1298 return SetStatus(DllExports::GdipSetEmpty(nativeRegion));
1299 }

◆ MakeInfinite()

Status Region::MakeInfinite ( )
inline

Definition at line 1302 of file gdiplusheaders.h.

1303 {
1304 return SetStatus(DllExports::GdipSetInfinite(nativeRegion));
1305 }

◆ SetStatus()

Status Region::SetStatus ( Status  status) const
inlineprivate

◆ Transform()

Status Region::Transform ( const Matrix matrix)
inline

Definition at line 1308 of file gdiplusheaders.h.

1309 {
1310 return SetStatus(DllExports::GdipTransformRegion(nativeRegion, matrix ? getNat(matrix) : NULL));
1311 }

◆ Translate() [1/2]

Status Region::Translate ( INT  dx,
INT  dy 
)
inline

Definition at line 1320 of file gdiplusheaders.h.

1321 {
1322 return SetStatus(DllExports::GdipTranslateRegionI(nativeRegion, dx, dy));
1323 }
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97

◆ Translate() [2/2]

Status Region::Translate ( REAL  dx,
REAL  dy 
)
inline

Definition at line 1314 of file gdiplusheaders.h.

1315 {
1316 return SetStatus(DllExports::GdipTranslateRegion(nativeRegion, dx, dy));
1317 }

◆ Union() [1/4]

Status Region::Union ( const GraphicsPath path)
inline

Definition at line 1345 of file gdiplusheaders.h.

1346 {
1347 return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, path ? getNat(path) : NULL, CombineModeUnion));
1348 }
@ CombineModeUnion
Definition: gdiplusenums.h:353

◆ Union() [2/4]

Status Region::Union ( const Rect rect)
inline

Definition at line 1326 of file gdiplusheaders.h.

1327 {
1328 return SetStatus(DllExports::GdipCombineRegionRectI(nativeRegion, &rect, CombineModeUnion));
1329 }

◆ Union() [3/4]

Status Region::Union ( const RectF rect)
inline

Definition at line 1339 of file gdiplusheaders.h.

1340 {
1341 return SetStatus(DllExports::GdipCombineRegionRect(nativeRegion, &rect, CombineModeUnion));
1342 }

◆ Union() [4/4]

Status Region::Union ( const Region region)
inline

Definition at line 1332 of file gdiplusheaders.h.

1333 {
1334 return SetStatus(
1335 DllExports::GdipCombineRegionRegion(nativeRegion, region ? getNat(region) : NULL, CombineModeUnion));
1336 }

◆ Xor() [1/4]

Status Region::Xor ( const GraphicsPath path)
inline

Definition at line 1351 of file gdiplusheaders.h.

1352 {
1353 return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, path ? getNat(path) : NULL, CombineModeXor));
1354 }
@ CombineModeXor
Definition: gdiplusenums.h:354

◆ Xor() [2/4]

Status Region::Xor ( const Rect rect)
inline

Definition at line 1363 of file gdiplusheaders.h.

1364 {
1365 return SetStatus(DllExports::GdipCombineRegionRectI(nativeRegion, &rect, CombineModeXor));
1366 }

◆ Xor() [3/4]

Status Region::Xor ( const RectF rect)
inline

Definition at line 1357 of file gdiplusheaders.h.

1358 {
1359 return SetStatus(DllExports::GdipCombineRegionRect(nativeRegion, &rect, CombineModeXor));
1360 }

◆ Xor() [4/4]

Status Region::Xor ( const Region region)
inline

Definition at line 1369 of file gdiplusheaders.h.

1370 {
1371 return SetStatus(
1372 DllExports::GdipCombineRegionRegion(nativeRegion, region ? getNat(region) : NULL, CombineModeXor));
1373 }

Friends And Related Function Documentation

◆ getNat

GpRegion *& getNat ( const Region region)
friend

◆ Graphics

friend class Graphics
friend

Definition at line 1015 of file gdiplusheaders.h.

◆ GraphicsPath

friend class GraphicsPath
friend

Definition at line 1016 of file gdiplusheaders.h.

◆ Matrix

friend class Matrix
friend

Definition at line 1017 of file gdiplusheaders.h.

Member Data Documentation

◆ lastStatus

Status Region::lastStatus
mutableprivate

Definition at line 1377 of file gdiplusheaders.h.

Referenced by Clone(), GetLastStatus(), Region(), and SetStatus().

◆ nativeRegion


The documentation for this class was generated from the following file: