GClasses
GClasses::GRect Class Reference

Detailed Description

Represents a rectangular region with integers.

#include <GRect.h>

Public Member Functions

 GRect ()
 
 GRect (int _x, int _y, int _w, int _h)
 
void clip (GRect *pClippingRect)
 Clips this rect to fit within pClippingRect. More...
 
bool doesInclude (int _x, int _y)
 Returns true of this rect includes the specified point. More...
 
void set (int _x, int _y, int _w, int _h)
 Sets all 4 values in this rect. More...
 

Public Attributes

int h
 
int w
 
int x
 
int y
 

Constructor & Destructor Documentation

GClasses::GRect::GRect ( )
inline
GClasses::GRect::GRect ( int  _x,
int  _y,
int  _w,
int  _h 
)
inline

Member Function Documentation

void GClasses::GRect::clip ( GRect pClippingRect)

Clips this rect to fit within pClippingRect.

bool GClasses::GRect::doesInclude ( int  _x,
int  _y 
)
inline

Returns true of this rect includes the specified point.

void GClasses::GRect::set ( int  _x,
int  _y,
int  _w,
int  _h 
)
inline

Sets all 4 values in this rect.

Member Data Documentation

int GClasses::GRect::h
int GClasses::GRect::w
int GClasses::GRect::x
int GClasses::GRect::y