#include <sdlrect.h>
Inherited by Wt::Rect.
Public Member Functions | |
SDLRect () | |
Create an empty rectangle at (0, 0). | |
SDLRect (int x, int y, int w, int h) | |
Create a rectangle. | |
SDLRect (const SDL_Rect &sdl_rect) | |
Create a rectangle from a SDL_Rect. | |
void | setRect (int x, int y, int w, int h) |
set's the rect's. | |
SDLRect & | operator= (const SDL_Rect &r) |
assign operator | |
int | width () const |
int | height () const |
Return the height of the rectangle. | |
int | x () const |
int | y () const |
int | left () const |
int | top () const |
int | right () const |
int | bottom () const |
void | setX (int pos) |
void | setY (int pos) |
void | setLeft (int pos) |
void | setTop (int pos) |
void | setWidth (int width) |
void | setHeight (int height) |
void | moveTopLeft (int x, int y) |
move the rectangle, specifying new upperleft corner | |
void | moveBy (int dx, int dy) |
move the rectangle by (dx, dy) | |
void | resize (int w, int h) |
this keeps the upper left corner and moves the lower right one | |
bool | operator== (const SDLRect &other) const |
Compare two rectangles for equality. | |
bool | operator!= (const SDLRect &other) const |
Compare two rectangles. | |
bool | contains (int x, int y) const |
Returns true if the rectangle contains point (x, y). | |
bool | contains (const SDLRect &r) const |
Returns true if the rectangle contains r. | |
bool | intersects (const SDLRect &r) const |
Returns true if the rectangle overlaps with r. | |
operator const SDL_Rect & () const | |
operator SDL_Rect & () | |
operator const SDL_Rect * () const | |
operator SDL_Rect * () |
Wt::SDLRect::SDLRect | ( | ) | [inline] |
Create an empty rectangle at (0, 0).
Wt::SDLRect::SDLRect | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h | |||
) | [inline] |
Create a rectangle.
Wt::SDLRect::SDLRect | ( | const SDL_Rect & | sdl_rect | ) | [inline] |
Create a rectangle from a SDL_Rect.
int Wt::SDLRect::bottom | ( | ) | const [inline] |
bool Wt::SDLRect::contains | ( | const SDLRect & | r | ) | const [inline] |
Returns true if the rectangle contains r.
bool Wt::SDLRect::contains | ( | int | x, | |
int | y | |||
) | const [inline] |
Returns true if the rectangle contains point (x, y).
int Wt::SDLRect::height | ( | ) | const [inline] |
Return the height of the rectangle.
bool Wt::SDLRect::intersects | ( | const SDLRect & | r | ) | const [inline] |
Returns true if the rectangle overlaps with r.
int Wt::SDLRect::left | ( | ) | const [inline] |
void Wt::SDLRect::moveBy | ( | int | dx, | |
int | dy | |||
) | [inline] |
move the rectangle by (dx, dy)
void Wt::SDLRect::moveTopLeft | ( | int | x, | |
int | y | |||
) | [inline] |
move the rectangle, specifying new upperleft corner
Wt::SDLRect::operator const SDL_Rect & | ( | ) | const [inline] |
Wt::SDLRect::operator const SDL_Rect * | ( | ) | const [inline] |
Wt::SDLRect::operator SDL_Rect & | ( | ) | [inline] |
Wt::SDLRect::operator SDL_Rect * | ( | ) | [inline] |
bool Wt::SDLRect::operator!= | ( | const SDLRect & | other | ) | const [inline] |
Compare two rectangles.
SDLRect& Wt::SDLRect::operator= | ( | const SDL_Rect & | r | ) | [inline] |
assign operator
bool Wt::SDLRect::operator== | ( | const SDLRect & | other | ) | const [inline] |
Compare two rectangles for equality.
void Wt::SDLRect::resize | ( | int | w, | |
int | h | |||
) | [inline] |
this keeps the upper left corner and moves the lower right one
int Wt::SDLRect::right | ( | ) | const [inline] |
void Wt::SDLRect::setHeight | ( | int | height | ) | [inline] |
void Wt::SDLRect::setLeft | ( | int | pos | ) | [inline] |
Reimplemented in Wt::Rect.
void Wt::SDLRect::setRect | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h | |||
) | [inline] |
set's the rect's.
void Wt::SDLRect::setTop | ( | int | pos | ) | [inline] |
Reimplemented in Wt::Rect.
void Wt::SDLRect::setWidth | ( | int | width | ) | [inline] |
void Wt::SDLRect::setX | ( | int | pos | ) | [inline] |
void Wt::SDLRect::setY | ( | int | pos | ) | [inline] |
int Wt::SDLRect::top | ( | ) | const [inline] |
int Wt::SDLRect::width | ( | ) | const [inline] |
int Wt::SDLRect::x | ( | ) | const [inline] |
int Wt::SDLRect::y | ( | ) | const [inline] |
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.