Rectangle object. More...
Public Member Functions | |
RectLT () noexcept | |
Default rectangle. More... | |
RectLT (T left, T top, T right, T bottom) noexcept | |
Constructor for a rectangle. More... | |
RectLT (Point2D< T > location, Size2D< T > size) noexcept | |
Constructor for a rectangle. More... | |
T | Left () const noexcept |
Gets the leftmost point of the rectangle. More... | |
void | SetLeft (T left) noexcept |
Sets leftmost point of the rectangle. More... | |
T | Top () const noexcept |
Gets top of the rectangle. More... | |
void | SetTop (T top) noexcept |
Sets top of the rectangle. More... | |
T | Right () const noexcept |
Gets rightmost point of the rectangle. More... | |
void | SetRight (T right) noexcept |
Sets rightmost point of the rectangle. More... | |
T | Bottom () const noexcept |
Gets bottom of the rectangle. More... | |
void | SetBottom (T bottom) noexcept |
Sets bottom of the rectangle. More... | |
T | Width () const noexcept |
Gets the width of the rectangle. More... | |
void | SetWidth (T width) noexcept |
Sets the width of the rectangle. More... | |
T | Height () const noexcept |
Gets the height of the rectangle. More... | |
void | SetHeight (T height) noexcept |
Sets the height of the rectangle. More... | |
Size2D< T > | Size () const noexcept |
Gets the size of the rectangle. More... | |
void | SetSize (Size2D< T > size) noexcept |
Gets the size of the rectangle. More... | |
Point2D< T > | Location () const noexcept |
Gets the location of the top left corner of the rectangle. More... | |
void | SetLocation (Point2D< T > location) noexcept |
Sets the location of the top left corner of the rectangle. More... | |
bool | IsValid () const noexcept |
Checks if the rectangle is valid. More... | |
bool | Contains (Point2D< T > point) const noexcept |
Checks if this rectangle contains a point. More... | |
CoordinateSystemType | CoordinateSystem () const noexcept |
Indicates the coordinate system in which this object is being measured (when used as an area of interest). More... | |
bool | operator== (const RectLT< T > &rect) const noexcept |
Compares to another rectangle. More... | |
bool | operator!= (const RectLT< T > &rect) const noexcept |
Compares to another rectangle. More... | |
template<class C > | |
operator RectLT< C > () const noexcept | |
Enable casting. | |
Rectangle object.
In contrast to the Rect class this class uses left top of each pixel as anchor point. Therefore right and bottom are not included (i.e. Width = Right - Left and Height = Bottom - Top).
|
inlinenoexcept |
Default rectangle.
Does | not throw any exception. |
All of the corner points will be at 0.
|
inlinenoexcept |
Constructor for a rectangle.
[in] | left | Leftmost point of the rectangle. |
[in] | top | Topmost point of the rectangle. |
[in] | right | Rightmost point of the rectangle. |
[in] | bottom | Bottom point of the rectangle. |
Does | not throw any exception. |
Constructor for a rectangle.
[in] | location | Location of the rectangle. |
[in] | size | Size of the rectangle. |
Does | not throw any exception. |
|
inlinenoexcept |
Gets bottom of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Checks if this rectangle contains a point.
[in] | point | Point to check. |
Does | not throw any exception. |
|
inlinenoexcept |
Indicates the coordinate system in which this object is being measured (when used as an area of interest).
Does | not throw any exception. |
|
inlinenoexcept |
Gets the height of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Checks if the rectangle is valid.
Does | not throw any exception. |
|
inlinenoexcept |
Gets the leftmost point of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Gets the location of the top left corner of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Compares to another rectangle.
[in] | rect | Other rectangle. |
Does | not throw any exception. |
|
inlinenoexcept |
Compares to another rectangle.
[in] | rect | Other rectangle. |
Does | not throw any exception. |
|
inlinenoexcept |
Gets rightmost point of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Sets bottom of the rectangle.
[in] | bottom | The bottom. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets the height of the rectangle.
[in] | height | The height. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets leftmost point of the rectangle.
[in] | left | Leftmost point. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets the location of the top left corner of the rectangle.
[in] | location | The location. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets rightmost point of the rectangle.
[in] | right | Rightmost point. |
Does | not throw any exception. |
|
inlinenoexcept |
Gets the size of the rectangle.
[in] | size | The size. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets top of the rectangle.
[in] | top | The top. |
Does | not throw any exception. |
|
inlinenoexcept |
Sets the width of the rectangle.
[in] | width | The width. |
Does | not throw any exception. |
|
inlinenoexcept |
Gets the size of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Gets top of the rectangle.
Does | not throw any exception. |
|
inlinenoexcept |
Gets the width of the rectangle.
Does | not throw any exception. |