28 #ifndef _NANO_POINT_H_ 29 #define _NANO_POINT_H_ 113 return {
static_cast<lcdint_t>(x - p.
x), static_cast<lcdint_t>(y - p.
y)};
122 return {
static_cast<lcdint_t>(x + p.
x), static_cast<lcdint_t>(y + p.
y)};
131 return {
static_cast<lcdint_t>(x >> bits), static_cast<lcdint_t>(y >> bits)};
140 return {
static_cast<lcdint_t>(x << bits), static_cast<lcdint_t>(y << bits)};
149 return {
static_cast<lcdint_t>(x / d), static_cast<lcdint_t>(y / d)};
154 #ifndef DOXYGEN_SHOULD_SKIP_THIS 167 return (p1.
x == p2.
x) && (p1.
y == p2.
y);
174 #endif // DOXYGEN_SHOULD_SKIP_THIS _NanoPoint operator-(const _NanoPoint &p)
Subtracts point.
struct _NanoPoint NanoPoint
Describes point.
void setPoint(lcdint_t px, lcdint_t py)
Initializes NanoPoint with specified values.
_NanoPoint operator+(const _NanoPoint &p)
Adds point.
_NanoPoint & operator<<=(const uint8_t bits)
Shifts left x,y value of the point by bits value.
int8_t lcdint_t
internal int type, used by the library.
_NanoPoint operator<<(const uint8_t bits) const
Shifts left x,y value of the point by bits value.
_NanoPoint & operator>>=(const uint8_t bits)
Shifts right x,y value of the point by bits value.
lcdint_t y
y position in pixels
Basic structures of canvas gfx library.
_NanoPoint operator/(const int16_t d) const
Divides x,y value of the point by d value.
_NanoPoint & operator+=(const _NanoPoint &p)
Adds point.
_NanoPoint & operator-=(const _NanoPoint &p)
Subtracts point.
_NanoPoint operator>>(const uint8_t bits) const
Shifts right x,y value of the point by bits value.
lcdint_t x
x position in pixels