#include <xrb_rect.hpp>
Public Member Functions | |
| Rect () | |
| Default constructor. | |
| Rect (Vector< T, 2 > const &size) | |
| Rect (T left, T bottom, T right, T top) | |
| Rect (Vector< T, 2 > const &bottom_left, Vector< T, 2 > const &top_right) | |
| Rect (Rect< T > const &source) | |
| void | operator= (Vector< T, 2 > const &size) |
| void | operator= (Rect< T > const &source) |
| bool | operator== (Rect< T > const &operand) |
| bool | operator!= (Rect< T > const &operand) |
| void | operator|= (Rect< T > const &operand) |
| void | operator&= (Rect< T > const &operand) |
| void | operator+= (Vector< T, 2 > const &operand) |
| void | operator-= (Vector< T, 2 > const &operand) |
| void | operator*= (SimpleTransform2< T > const &transform) |
| Vector< T, 2 > | TopLeft () const |
| Vector< T, 2 > const & | TopRight () const |
| Vector< T, 2 > const & | BottomLeft () const |
| Vector< T, 2 > | BottomRight () const |
| T | Top () const |
| T | Left () const |
| T | Bottom () const |
| T | Right () const |
| Vector< T, 2 > | Center () const |
| Vector< T, 2 > | Size () const |
| T | Width () const |
| T | Height () const |
| Rect< T > | Grown (Vector< T, 2 > const &vector_to_grow_by) const |
| bool | IsValid () const |
| bool | HasPositiveArea () const |
| bool | IsPointInside (Vector< T, 2 > const &point) const |
| template<typename U > | |
| Rect< U > | StaticCast () const |
| void | SetTopLeft (Vector< T, 2 > const &top_left) |
| void | SetTopRight (Vector< T, 2 > const &top_right) |
| void | SetBottomLeft (Vector< T, 2 > const &bottom_left) |
| void | SetBottomRight (Vector< T, 2 > const &bottom_right) |
| void | SetTop (T top) |
| void | SetLeft (T left) |
| void | SetBottom (T bottom) |
| void | SetRight (T right) |
| void | SetCenter (Vector< T, 2 > const ¢er) |
| void | SetSize (Vector< T, 2 > const &size) |
| void | SetSize (Uint32 component, T size) |
| void | SetWidth (T const width) |
| void | SetHeight (T const height) |
| template<typename U > | |
| void | StaticCastAssign (Rect< U > const &source) |
| void | EncompassPoint (Vector< T, 2 > const &point) |
| void | Flip () |
| void | Flip (Dim::Component const component) |
| void | Fprint (FILE *const fptr, char const *const component_printf_format, bool const show_size_instead_of_top_right=true, bool const add_newline=true) const |
| void | Grow (Vector< T, 2 > const &vector_to_grow_by) |
Public Attributes | |
| Vector< T, 2 > | m_bottom_left |
| The bottom-left coordinate of the rectangle. | |
| Vector< T, 2 > | m_top_right |
| The top-right coordinate of the rectangle. | |
Intended for use to specify regions in screen coordinates. Templatized for the purpose of allowing integer and floating-point based rectangles. The coordinate system used is right-handed:
A
| top-left corner top-right corner
Y | +-----------------------------+
| | |
a | | |
x | | |
i | | |
s | +-----------------------------+
| bottom-left corner bottom-right corner
----+----------------------------------------------------->
| X axis
|
The region specified by a Rect object is the axially-aligned box contained within the coordinates given by m_bottom_left and m_top_right.
Definition at line 44 of file xrb_rect.hpp.
1.5.8