GRect Class Reference

Rectangle class. More...

#include <GRect.h>

Inheritance diagram for GRect:

GItem::ItemPaintCtx GRegion

List of all members.

Public Member Functions

int X ()
 Returns the width.
int Y ()
 Returns the height.
void Set (int X1, int Y1, int X2, int Y2)
 Sets the rectangle.
void ZOff (int x, int y)
 Zero offset, sets the top left to 0,0 and the bottom right to x,y.
void Normal ()
 Normalizes the rectangle so that left is less than the right and so on.
bool Valid ()
 Returns true if the rectangle is valid.
void Offset (int x, int y)
 Moves the rectangle by an offset.
void Offset (GRect *a)
 Moves the edges by an offset.
void Size (int x, int y)
 Zooms the rectangle.
void Size (GRect *a)
 Zooms the rectangle.
void Dimension (int x, int y)
 Sets the width and height.
void Dimension (GRect *a)
 Sets the width and height.
void Bound (GRect *b)
 Sets the rectangle to the intersection of this object and 'b'.
bool Overlap (int x, int y)
 Returns true if the point 'x,y' is in this rectangle.
bool Overlap (GRect *b)
 Returns true if the rectangle 'b' overlaps this rectangle.
void Union (int x, int y)
 Enlarges this rectangle to include the point 'x,y'.
void Union (GRect *a)
 Enlarges this rectangle to include all points in 'a'.
void Union (GRect *a, GRect *b)
 Makes this rectangle include all points in 'a' and 'b'.
void Intersection (GRect *a)
 Makes this rectangle the intersection of 'this' and 'a'.
void Intersection (GRect *a, GRect *b)
 Makes this rectangle the intersection of 'a' and 'b'.
char * GetStr ()
 Returns a static string formated to include the points in the order: x1,y1,x2,y2.
bool SetStr (char *s)
 Sets the rect from a string containing: x1,y1,x2,y2.
int Near (int x, int y)
 Returns how near a point is to a rectangle.
int Near (GRect &r)
 Returns how near a point is to a rectangle.
 operator OsRect ()
 Returns an operating system specific rectangle.

Detailed Description

Rectangle class.
The documentation for this class was generated from the following files:

Generated on Wed Dec 1 15:41:04 2010 for Lgi by  doxygen