Graphics::Region Class Reference
Represents the intersection of two rectangles. More...
#include <Types.h>
Collaboration diagram for Graphics::Region:
Public Member Functions | |
constexpr | Region ()=default |
constexpr | Region (const Region &other)=default |
constexpr | Region (const Rect &r) |
Region & | operator+= (const Rect &r) |
Add rectangle to this region. More... | |
Region & | operator-= (const Rect &r) |
Remove rectangle from this region. More... | |
Rect | bounds () const |
void | clear () |
operator bool () const | |
String | toString () const |
Public Attributes | |
Rect | rects [4] {} |
Detailed Description
Represents the intersection of two rectangles.
This produces up to 4 separate, non-overlapping rectangles.
Constructor & Destructor Documentation
◆ Region() [1/3]
|
constexprdefault |
◆ Region() [2/3]
|
constexprdefault |
◆ Region() [3/3]
|
inlineconstexpr |
Member Function Documentation
◆ bounds()
|
inline |
◆ clear()
|
inline |
◆ operator bool()
|
inlineexplicit |
◆ operator+=()
Add rectangle to this region.
Produces a single enclosing rectangle.
◆ operator-=()
Remove rectangle from this region.
Operation is currently performed on bounding box ONLY. TODO: Implement region updates using existing information.
◆ toString()
String Graphics::Region::toString | ( | ) | const |
Member Data Documentation
◆ rects
Rect Graphics::Region::rects[4] {} |
The documentation for this class was generated from the following file: