#include <sdlmm_srect.h>
Inheritance diagram for SDLmm::SRect::
Public Methods | |
SRect () | |
Default constructor which creates an empty SRect (xywh variables set to sero). More... | |
SRect (const SRect &rect) | |
This is the copy constructor. Simply initializes the value of an SRect to that of another SRect. More... | |
SRect (const SDL_Rect &rect) | |
Constructor which initializes the class from an SDL_Rect struct. More... | |
SRect (const SPoint &point) | |
Constructor which initializes the class from an SPoint object. More... | |
SRect (const SPoint &upper_left_point, const SPoint &bottom_right_point) | |
Construct an object using the given upper left and bottom right corners. More... | |
SRect (const SPoint &point, Uint16 nw, Uint16 nh) | |
Constructor which initializes the class from an SPoint object and integer values. More... | |
SRect (Sint16 nx, Sint16 ny, Uint16 nw, Uint16 nh) | |
Constructor which initializes the class from integer values. More... | |
SRect (Uint16 nw, Uint16 nh) | |
Constructor which initializes the width and height from integer values. More... | |
SRect& | operator= (const SDL_Rect &rect) |
Set the value of an SRect to that of an existing SDL_Rect or SRect. More... | |
bool | operator== (const SDL_Rect &rect) const |
Compare two rectangles for equality. More... | |
void | Move (const SPoint &point) |
Move the position of the rectangle. More... | |
bool | Contains (const SPoint &point) const |
Is the point in the rectangle? More... | |
SPoint | GetUpperLeft () const |
Get the coordinates for the upper left corner of the SRect. More... | |
SPoint | GetUpperRight () const |
Get the coordinates for the upper right corner of the SRect. More... | |
SPoint | GetBottomLeft () const |
Get the coordinates for the bottom left corner of the SRect. More... | |
SPoint | GetBottomRight () const |
Get the coordinates for the bottom right corner of the SRect. More... |
Definition at line 43 of file sdlmm_srect.h.
|
Default constructor which creates an empty SRect (xywh variables set to sero).
Definition at line 30 of file sdlmm_srect.cpp. |
|
This is the copy constructor. Simply initializes the value of an SRect to that of another SRect.
Definition at line 34 of file sdlmm_srect.cpp. |
|
Constructor which initializes the class from an SDL_Rect struct.
Definition at line 39 of file sdlmm_srect.cpp. |
|
Constructor which initializes the class from an SPoint object. The x and y values will be initialized with the x/y values of the SPoint. h and w will be set to zero.
Definition at line 53 of file sdlmm_srect.cpp. |
|
Construct an object using the given upper left and bottom right corners.
Definition at line 62 of file sdlmm_srect.cpp. |
|
Constructor which initializes the class from an SPoint object and integer values. The x and y values will be initialized with the x/y values of the SPoint and the dimensions from nw and nh.
Definition at line 57 of file sdlmm_srect.cpp. |
|
Constructor which initializes the class from integer values.
Definition at line 44 of file sdlmm_srect.cpp. |
|
Constructor which initializes the width and height from integer values. The x/y coordinates for the upper left corner will be set to zero.
Definition at line 48 of file sdlmm_srect.cpp. |
|
Is the point in the rectangle?
Definition at line 125 of file sdlmm_srect.h. |
|
Get the coordinates for the bottom left corner of the SRect.
Definition at line 138 of file sdlmm_srect.h. |
|
Get the coordinates for the bottom right corner of the SRect.
Definition at line 141 of file sdlmm_srect.h. |
|
Get the coordinates for the upper left corner of the SRect.
Definition at line 132 of file sdlmm_srect.h. |
|
Get the coordinates for the upper right corner of the SRect.
Definition at line 135 of file sdlmm_srect.h. |
|
Move the position of the rectangle.
Definition at line 120 of file sdlmm_srect.h. |
|
Set the value of an SRect to that of an existing SDL_Rect or SRect.
Definition at line 100 of file sdlmm_srect.h. |
|
Compare two rectangles for equality.
Definition at line 111 of file sdlmm_srect.h. |
Documentation automatically generated by written by Dimitri van Heesch. | Project hosted at |