Location and size of rectangular area (x, y, w, h)
More...
#include <Types.h>
|
| constexpr | Rect () |
| |
| constexpr | Rect (int16_t x, int16_t y, uint16_t w, uint16_t h) |
| |
| constexpr | Rect (int16_t x, int16_t y, Size size) |
| |
| constexpr | Rect (Point pt, Size size) |
| |
| constexpr | Rect (Point pt, uint16_t w, uint16_t h) |
| |
| constexpr | Rect (Size size) |
| |
| constexpr | Rect (Point pt1, Point pt2) |
| |
| constexpr | Rect (Point pt, Size size, Origin origin) |
| |
| Point | getPoint (Origin origin) const |
| |
| Point | operator[] (Origin origin) const |
| |
| int16_t | left () const |
| |
| int16_t | right () const |
| |
| int16_t | top () const |
| |
| int16_t | bottom () const |
| |
| Point | topLeft () const |
| |
| Point | topRight () const |
| |
| Point | bottomLeft () const |
| |
| Point | bottomRight () const |
| |
| Point | centre () const |
| |
| Point | center () const |
| |
| Size | size () const |
| |
| | operator bool () const |
| |
| bool | operator== (const Rect &other) const |
| |
| bool | operator!= (const Rect &other) const |
| |
| Rect & | operator+= (const Point &off) |
| |
| Rect & | operator-= (const Point &off) |
| |
| bool | contains (Point pt) const |
| |
| int16_t | clipX (int16_t x) const |
| |
| int16_t | clipY (int16_t y) const |
| |
| Point | clip (Point pt) const |
| |
| bool | intersects (const Rect &r) const |
| |
| Rect & | clip (const Rect &r) |
| | Obtain intersection with another rectangle. More...
|
| |
| Rect & | operator+= (const Rect &r) |
| | Obtain smallest rectangle enclosing this rectangle and another. More...
|
| |
| void | inflate (int16_t cw, int16_t ch) |
| |
| void | inflate (int16_t cwh) |
| |
| String | toString () const |
| |
|
| int16_t | x {0} |
| |
| int16_t | y {0} |
| |
| uint16_t | w {0} |
| |
| uint16_t | h {0} |
| |
Location and size of rectangular area (x, y, w, h)
◆ Rect() [1/8]
| constexpr Graphics::Rect::Rect |
( |
| ) |
|
|
inlineconstexpr |
◆ Rect() [2/8]
| constexpr Graphics::Rect::Rect |
( |
int16_t |
x, |
|
|
int16_t |
y, |
|
|
uint16_t |
w, |
|
|
uint16_t |
h |
|
) |
| |
|
inlineconstexpr |
◆ Rect() [3/8]
| constexpr Graphics::Rect::Rect |
( |
int16_t |
x, |
|
|
int16_t |
y, |
|
|
Size |
size |
|
) |
| |
|
inlineconstexpr |
◆ Rect() [4/8]
| constexpr Graphics::Rect::Rect |
( |
Point |
pt, |
|
|
Size |
size |
|
) |
| |
|
inlineconstexpr |
◆ Rect() [5/8]
| constexpr Graphics::Rect::Rect |
( |
Point |
pt, |
|
|
uint16_t |
w, |
|
|
uint16_t |
h |
|
) |
| |
|
inlineconstexpr |
◆ Rect() [6/8]
| constexpr Graphics::Rect::Rect |
( |
Size |
size | ) |
|
|
inlineconstexpr |
◆ Rect() [7/8]
| constexpr Graphics::Rect::Rect |
( |
Point |
pt1, |
|
|
Point |
pt2 |
|
) |
| |
|
inlineconstexpr |
◆ Rect() [8/8]
◆ bottom()
| int16_t Graphics::Rect::bottom |
( |
| ) |
const |
|
inline |
◆ bottomLeft()
| Point Graphics::Rect::bottomLeft |
( |
| ) |
const |
|
inline |
◆ bottomRight()
| Point Graphics::Rect::bottomRight |
( |
| ) |
const |
|
inline |
◆ center()
| Point Graphics::Rect::center |
( |
| ) |
const |
|
inline |
◆ centre()
| Point Graphics::Rect::centre |
( |
| ) |
const |
|
inline |
◆ clip() [1/2]
| Rect& Graphics::Rect::clip |
( |
const Rect & |
r | ) |
|
|
inline |
Obtain intersection with another rectangle.
◆ clip() [2/2]
◆ clipX()
| int16_t Graphics::Rect::clipX |
( |
int16_t |
x | ) |
const |
|
inline |
◆ clipY()
| int16_t Graphics::Rect::clipY |
( |
int16_t |
y | ) |
const |
|
inline |
◆ contains()
| bool Graphics::Rect::contains |
( |
Point |
pt | ) |
const |
|
inline |
◆ getPoint()
◆ inflate() [1/2]
| void Graphics::Rect::inflate |
( |
int16_t |
cw, |
|
|
int16_t |
ch |
|
) |
| |
|
inline |
◆ inflate() [2/2]
| void Graphics::Rect::inflate |
( |
int16_t |
cwh | ) |
|
|
inline |
◆ intersects()
| bool Graphics::Rect::intersects |
( |
const Rect & |
r | ) |
const |
|
inline |
◆ left()
| int16_t Graphics::Rect::left |
( |
| ) |
const |
|
inline |
◆ operator bool()
| Graphics::Rect::operator bool |
( |
| ) |
const |
|
inlineexplicit |
◆ operator!=()
◆ operator+=() [1/2]
| Rect& Graphics::Rect::operator+= |
( |
const Point & |
off | ) |
|
|
inline |
◆ operator+=() [2/2]
| Rect& Graphics::Rect::operator+= |
( |
const Rect & |
r | ) |
|
|
inline |
Obtain smallest rectangle enclosing this rectangle and another.
◆ operator-=()
| Rect& Graphics::Rect::operator-= |
( |
const Point & |
off | ) |
|
|
inline |
◆ operator==()
| bool Graphics::Rect::operator== |
( |
const Rect & |
other | ) |
const |
|
inline |
◆ operator[]()
| Point Graphics::Rect::operator[] |
( |
Origin |
origin | ) |
const |
|
inline |
◆ right()
| int16_t Graphics::Rect::right |
( |
| ) |
const |
|
inline |
◆ size()
| Size Graphics::Rect::size |
( |
| ) |
const |
|
inline |
◆ top()
| int16_t Graphics::Rect::top |
( |
| ) |
const |
|
inline |
◆ topLeft()
| Point Graphics::Rect::topLeft |
( |
| ) |
const |
|
inline |
◆ topRight()
| Point Graphics::Rect::topRight |
( |
| ) |
const |
|
inline |
◆ toString()
| String Graphics::Rect::toString |
( |
| ) |
const |
| uint16_t Graphics::Rect::h {0} |
| uint16_t Graphics::Rect::w {0} |
| int16_t Graphics::Rect::x {0} |
| int16_t Graphics::Rect::y {0} |
The documentation for this struct was generated from the following file: