#include <mxtype.h>
Public Member Functions | |
| Rect () | |
| Rect (SDL_Rect &rc) | |
| Rect (SDL_Rect *rc) | |
| Rect (int x, int y, int width, int height) | |
| Rect (const Rect &r) | |
| Rect (const Point &p, const Size &s) | |
| const int | width () const |
| const int | height () const |
| const int | x () const |
| const int | y () const |
| const bool | pointInRect (Point p) const |
| operator SDL_Rect () | |
Public Attributes | |
| Point | point |
| Size | rsize |
Definition at line 63 of file mxtype.h.
| mx::Rect::Rect | ( | SDL_Rect & | rc | ) | [inline] |
| mx::Rect::Rect | ( | SDL_Rect * | rc | ) | [inline] |
| mx::Rect::Rect | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height | |||
| ) | [inline] |
| mx::Rect::Rect | ( | const Rect & | r | ) | [inline] |
| const int mx::Rect::height | ( | ) | const [inline] |
height of the Rect
Definition at line 108 of file mxtype.h.
References mx::Size::height, and rsize.
Referenced by mx::mxSurface::copySurface().
00108 { return rsize.height; }
| mx::Rect::operator SDL_Rect | ( | ) | [inline] |
operator SDL_Rect so Rect can be used as a SDL_Rect in expressions
Definition at line 130 of file mxtype.h.
References mx::Size::height, point, rsize, mx::Size::width, mx::Point::x, and mx::Point::y.
00130 { 00131 SDL_Rect rc = { point.x, point.y, rsize.width, rsize.height }; 00132 return rc; 00133 }
| const bool mx::Rect::pointInRect | ( | Point | p | ) | const [inline] |
is this Point inside this Rect ?
| p | the Point |
Definition at line 122 of file mxtype.h.
References mx::Size::height, point, rsize, mx::Size::width, mx::Point::x, and mx::Point::y.
00123 { 00124 if(p.x >= point.x && p.x <= point.x+rsize.width && p.y >= point.y && p.y <= point.y+rsize.height) return true; 00125 return false; 00126 }
| const int mx::Rect::width | ( | ) | const [inline] |
width of the Rect
Definition at line 104 of file mxtype.h.
References rsize, and mx::Size::width.
Referenced by mx::mxSurface::copySurface().
00104 { return rsize.width; }
| const int mx::Rect::x | ( | ) | const [inline] |
x of the Rect
Definition at line 112 of file mxtype.h.
References point, and mx::Point::x.
Referenced by mx::mxSurface::copySurface().
00112 { return point.x; }
| const int mx::Rect::y | ( | ) | const [inline] |
y of the Rect
Definition at line 116 of file mxtype.h.
References point, and mx::Point::y.
Referenced by mx::mxSurface::copySurface().
00116 { return point.y; }
Point variable for X,Y
Definition at line 65 of file mxtype.h.
Referenced by operator SDL_Rect(), pointInRect(), Rect(), x(), and y().
Size variable for size width,height
Definition at line 67 of file mxtype.h.
Referenced by height(), operator SDL_Rect(), pointInRect(), Rect(), and width().
1.5.8