Main Page | Class List | File List | Class Members | Related Pages

Rect Class Reference

Provides a simple rect class. More...

#include <global.h>

List of all members.

Public Member Functions

 Rect ()
 standard constructor
 Rect (int _x, int _y, int _w, int _h)
int Left () const
 left
int Top () const
 top
int Right () const
 left + width
int Bottom () const
 top + height
bool RectIntersect (const Rect *rcSrc) const
void Inflate (int dx, int dy)
void Set (int x, int y, int w, int h)


Detailed Description

Provides a simple rect class.

Rect implements a rect class which supports

methods.

Note:
To make it more easy just directly access x,y,w,h via the member variables.
Author:
Michael Menne

Definition at line 90 of file global.h.


Constructor & Destructor Documentation

Rect::Rect int  _x,
int  _y,
int  _w,
int  _h
[inline]
 

constructor with initialization

Parameters:
_x origion x
_y origion y
_w width
_h height

Definition at line 102 of file global.h.


Member Function Documentation

void Rect::Inflate int  dx,
int  dy
[inline]
 

inflate rect by dx, dy

Parameters:
dx inflate x-direction by dx
dy inflate y-direction by dy

Definition at line 129 of file global.h.

bool Rect::RectIntersect const Rect rcSrc  )  const [inline]
 

intersect rects

Parameters:
rcSrc intersect with this rect
Returns:
true, if the two rects intersect, else false

Definition at line 118 of file global.h.

References h, w, x, and y.

void Rect::Set int  x,
int  y,
int  w,
int  h
[inline]
 

set origin, with and height

Parameters:
x top
y left
w width
h height

Definition at line 144 of file global.h.


The documentation for this class was generated from the following file:
Generated on Sun Jan 16 18:20:26 2005 for WDSMap by  doxygen 1.3.9.1