 |
|
 |
 |
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLMISC::CRect Class ReferenceThis class describe an integer 2d rectangle.
More...
#include <rect.h>
List of all members.
Public Methods |
| | CRect () |
| | default ctor. More...
|
| | CRect (sint32 x, sint32 y, uint32 width, uint32 height) |
| | Constructor with a 2d point, a width and a height. More...
|
| | CRect (sint32 x, sint32 y) |
| | Constructor with a single 2d point. Build a rectangle with width and height = 0. More...
|
| void | setWH (sint32 x, sint32 y, uint32 width, uint32 height) |
| | Set from a 2d point, a width and a height. More...
|
| void | set (sint32 x0, sint32 y0, sint32 x1, sint32 y1) |
| | Set from 2 2d points. More...
|
| void | extend (sint32 x, sint32 y) |
| | Extend the box for including the point which coordinates are passed in parameter. More...
|
| sint32 | left () const |
| | Return the lower X coordinate of the box. More...
|
| sint32 | right () const |
| | Return the higher X coordinate of the box + 1. More...
|
| sint32 | top () const |
| | Return the lower Y coordinate of the box. More...
|
| sint32 | bottom () const |
| | Return the higher Y coordinate of the box + 1. More...
|
| sint32 | getXCenter () const |
| | Compute the x center of the rectangle. More...
|
| sint32 | getYCenter () const |
| | Compute the y center of the rectangle. More...
|
Public Attributes |
| sint32 | X |
| | Lower X coordinate of the rect. More...
|
| sint32 | Y |
| | Lower Y coordinate of the rect. More...
|
| uint32 | Width |
| | Width of the rect. More...
|
| uint32 | Height |
| | Height of the rect. More...
|
Detailed Description
This class describe an integer 2d rectangle.
-
Author:
-
Cyril Corvazier , Nevrax France
-
Date:
-
2000
Definition at line 43 of file rect.h.
Constructor & Destructor Documentation
| NLMISC::CRect::CRect |
( |
|
) |
[inline] |
|
|
|
default ctor.
Definition at line 47 of file rect.h. |
|
|
Constructor with a single 2d point. Build a rectangle with width and height = 0.
Definition at line 53 of file rect.h.
References Height, Width, X, x, Y, and y. |
Member Function Documentation
| sint32 NLMISC::CRect::bottom |
( |
|
) |
const [inline] |
|
|
|
Extend the box for including the point which coordinates are passed in parameter.
Definition at line 35 of file rect.cpp.
References Height, Width, X, x, Y, and y. |
| sint32 NLMISC::CRect::getXCenter |
( |
|
) |
const [inline] |
|
|
|
Compute the x center of the rectangle.
Definition at line 95 of file rect.h.
References Width, and X. |
| sint32 NLMISC::CRect::getYCenter |
( |
|
) |
const [inline] |
|
|
|
Compute the y center of the rectangle.
Definition at line 101 of file rect.h.
References Height, and Y. |
| sint32 NLMISC::CRect::left |
( |
|
) |
const [inline] |
|
|
|
Return the lower X coordinate of the box.
Definition at line 71 of file rect.h.
References X. |
| sint32 NLMISC::CRect::right |
( |
|
) |
const [inline] |
|
| sint32 NLMISC::CRect::top |
( |
|
) |
const [inline] |
|
|
|
Return the lower Y coordinate of the box.
Definition at line 83 of file rect.h.
References Y. |
Member Data Documentation
The documentation for this class was generated from the following files:
|
 |