53 return p2.
x - p1.
x + 1;
65 return p2.
y - p1.
y + 1;
73 void move(lcdint_t dx, lcdint_t dy)
75 p1.
x += dx; p2.
x += dx;
76 p1.
y += dy; p2.
y += dy;
85 p1.
x += dx; p2.
x += dx;
105 void setRect(lcdint_t l, lcdint_t t, lcdint_t r, lcdint_t b)
118 if (p1.
x < rect.
p1.
x) p1.
x = rect.
p1.
x;
119 if (p1.
y < rect.
p1.
y) p1.
y = rect.
p1.
y;
120 if (p2.
x > rect.
p2.
x) p2.
x = rect.
p2.
x;
121 if (p2.
y > rect.
p2.
y) p2.
y = rect.
p2.
y;
130 return (x >= p1.
x) && (x <= p2.
x);
137 bool collisionY(lcdint_t y)
const {
return (y >= p1.
y) && (y <= p2.
y); };
196 return { {
static_cast<lcdint_t
>(p1.
x - p.
x), static_cast<lcdint_t>(p1.
y - p.
y) },
197 {
static_cast<lcdint_t
>(p2.
x - p.
x), static_cast<lcdint_t>(p2.
y - p.
y) } };
206 return { {
static_cast<lcdint_t
>(p1.
x + p.
x), static_cast<lcdint_t>(p1.
y + p.
y) },
207 {
static_cast<lcdint_t
>(p2.
x + p.
x), static_cast<lcdint_t>(p2.
y + p.
y) } };
229 return { p1 >> bits, p2 >> bits };
238 return { p1 << bits, p2 << bits };
244 #ifndef DOXYGEN_SHOULD_SKIP_THIS void crop(const _NanoRect &rect)
_NanoRect operator-(const _NanoPoint &p)
_NanoRect operator+(const _NanoPoint &p)
bool collisionY(lcdint_t y) const
_NanoRect operator<<(const uint8_t bits) const
bool above(const NanoPoint &p) const
bool collision(const NanoPoint &p) const
struct _NanoRect NanoRect
_NanoRect operator>>(const uint8_t bits) const
bool contains(const NanoPoint &p) const
void setRect(lcdint_t l, lcdint_t t, lcdint_t r, lcdint_t b)
_NanoRect & operator+=(const _NanoPoint &p)
bool below(const NanoPoint &p) const
bool collisionX(lcdint_t x) const
void move(lcdint_t dx, lcdint_t dy)
const NanoPoint size() const
bool contains(const _NanoRect &r) const
bool containsPartOf(const _NanoRect &r) const