Faith::Rect Class Reference

#include <faith/rect.h>

List of all members.

Public Member Functions

 Rect ()
 Rect (int x, int y, int w, int h)
 Rect (int x, int y, const Size &size)
 Rect (const Point &pt, const Size &size)
 Rect (const Point &pt, const Point &bottomRight)
 Rect (const Point &pt, int w, int h)
 Rect (const Size &size)
bool operator== (const Rect &other) const
void operator+= (const Point &d)
Rect operator+ (const Point &d) const
bool isInvalid () const
bool isValid () const
int left () const
int right () const
int top () const
int bottom () const
Point topLeft () const
void setTopLeft (const Point &pt)
Point bottomLeft () const
Point bottomRight () const
void moveBy (int x, int y)
int x () const
int y () const
int width () const
int height () const
void move (int x, int y)
void move (const Point &pt)
void resize (int x, int y)
void resize (const Size &size)
bool contains (const Faith::Point &other)
Point center () const
Size size () const
void setRect (int x, int y, int w, int h)
void rect (int *x, int *y, int *w, int *h) const
void coords (int *x, int *y, int *bx, int *by) const
void setCoords (int x, int y, int bx, int by)
void addCoords (int x, int y, int bx, int by)
Rect unite (const Rect &other) const
void moveCenter (const Point &to)


Constructor & Destructor Documentation

Faith::Rect::Rect (  )  [inline]

Faith::Rect::Rect ( int  x,
int  y,
int  w,
int  h 
) [inline]

Faith::Rect::Rect ( int  x,
int  y,
const Size size 
) [inline]

Faith::Rect::Rect ( const Point pt,
const Size size 
) [inline]

Faith::Rect::Rect ( const Point pt,
const Point bottomRight 
) [inline]

Faith::Rect::Rect ( const Point pt,
int  w,
int  h 
) [inline]

Faith::Rect::Rect ( const Size size  )  [inline, explicit]


Member Function Documentation

void Faith::Rect::addCoords ( int  x,
int  y,
int  bx,
int  by 
) [inline]

adds the given parameters to each component (x,y,w,h).

For example, addCoords(1,1,-1,-1) makes the rect 2 smaller in each dimension

int Faith::Rect::bottom (  )  const [inline]

Point Faith::Rect::bottomLeft (  )  const [inline]

Point Faith::Rect::bottomRight (  )  const [inline]

Point Faith::Rect::center (  )  const [inline]

bool Faith::Rect::contains ( const Faith::Point other  )  [inline]

void Faith::Rect::coords ( int *  x,
int *  y,
int *  bx,
int *  by 
) const [inline]

int Faith::Rect::height (  )  const [inline]

bool Faith::Rect::isInvalid (  )  const [inline]

Returns:
true if either dimension of the size is negative

bool Faith::Rect::isValid (  )  const [inline]

int Faith::Rect::left (  )  const [inline]

void Faith::Rect::move ( const Point pt  )  [inline]

void Faith::Rect::move ( int  x,
int  y 
) [inline]

void Faith::Rect::moveBy ( int  x,
int  y 
) [inline]

void Faith::Rect::moveCenter ( const Point to  )  [inline]

Rect Faith::Rect::operator+ ( const Point d  )  const [inline]

void Faith::Rect::operator+= ( const Point d  )  [inline]

bool Faith::Rect::operator== ( const Rect other  )  const [inline]

void Faith::Rect::rect ( int *  x,
int *  y,
int *  w,
int *  h 
) const [inline]

void Faith::Rect::resize ( const Size size  )  [inline]

void Faith::Rect::resize ( int  x,
int  y 
) [inline]

int Faith::Rect::right (  )  const [inline]

void Faith::Rect::setCoords ( int  x,
int  y,
int  bx,
int  by 
) [inline]

void Faith::Rect::setRect ( int  x,
int  y,
int  w,
int  h 
) [inline]

void Faith::Rect::setTopLeft ( const Point pt  )  [inline]

Size Faith::Rect::size (  )  const [inline]

int Faith::Rect::top (  )  const [inline]

Point Faith::Rect::topLeft (  )  const [inline]

Rect Faith::Rect::unite ( const Rect other  )  const [inline]

int Faith::Rect::width (  )  const [inline]

int Faith::Rect::x (  )  const [inline]

int Faith::Rect::y (  )  const [inline]


The documentation for this class was generated from the following file:
Generated on Fri Sep 1 00:23:09 2006 for Faith by  doxygen 1.4.7