23 #ifndef _NANO_GFX_TYPES_H_ 24 #define _NANO_GFX_TYPES_H_ 81 void setPos(uint8_t x, uint8_t y);
106 return (((uint8_t)(x-lx)<w) || ((uint8_t)(lx-x)<w)) &&
107 (((uint8_t)(y-ly)<8) || ((uint8_t)(ly-
y)<8));
120 uint8_t right = ((x + w - 1)>>3);
121 uint8_t bottom = ((y + 7)>>3);
122 uint8_t left = x>>3; left = left < right ? left: 0;
123 uint8_t top = y>>3; top = top < bottom ? top: 0;
138 uint8_t right = (uint8_t)(lx + w - 1);
139 uint8_t bottom = (uint8_t)(ly + 7);
140 left = left < right ? left: 0;
141 top = top < bottom ? top: 0;
153 uint8_t left = min(x,lx);
154 uint8_t top = min(y,ly);
155 uint8_t right = max((uint8_t)(x + w - 1), (uint8_t)(lx + w - 1));
156 uint8_t bottom = max((uint8_t)(y + 7), (uint8_t)(ly + 7));
157 if ( left >= right ) left = 0;
158 if ( top >= bottom ) top = 0;
164 #endif // _NANO_GFX_TYPES_H_
const uint8_t * data
Pointer to PROGMEM data, representing sprite image.
const uint8_t * transparentMask
Pointer to PROGMEM data, representing sprite transparencyMask (can be nullptr)
void setPos(uint8_t x, uint8_t y)
uint8_t y
draw position Y on the screen
SSD1306_RECT getUpdateRect() const
uint8_t x
draw position X on the screen
SSD1306_RECT getRect() const
uint8_t lx
last draw position X on the screen
uint8_t ly
last draw position Y on the screen
SSD1306_RECT getLRect() const