Add width() and height() for NO_GFX
add int16_t width() and int16_t height(), when NO_GFX is enabled. you also could get the dimesions the following way height = matrix.getCfg().mx_height; width = matrix.getCfg().mx_width * matrix.getCfg().chain_length; but I think the new funktions are simpler
This commit is contained in:
parent
692078352e
commit
75e9478e7f
1 changed files with 5 additions and 0 deletions
|
@ -571,6 +571,11 @@ public:
|
|||
void drawPixel(int16_t x, int16_t y, CRGB color);
|
||||
#endif
|
||||
|
||||
#ifdef NO_GFX
|
||||
inline int16_t width() const { return m_cfg.mx_width * m_cfg.chain_length; }
|
||||
inline int16_t height() const { return m_cfg.mx_height; }
|
||||
#endif
|
||||
|
||||
void drawIcon(int *ico, int16_t x, int16_t y, int16_t cols, int16_t rows);
|
||||
|
||||
// Colour 444 is a 4 bit scale, so 0 to 15, colour 565 takes a 0-255 bit value, so scale up by 255/15 (i.e. 17)!
|
||||
|
|
Loading…
Reference in a new issue