Added line drawing function based on Bresenham

This commit is contained in:
lost-hope
2022-05-19 22:49:04 +02:00
parent 3ba4702181
commit 65f5bc531c
2 changed files with 17 additions and 1 deletions

View File

@@ -919,7 +919,8 @@ class WS2812FX {
fill_solid(CRGB* leds, const struct CRGB& color),
fadeToBlackBy(CRGB* leds, uint8_t fadeBy),
nscale8(CRGB* leds, uint8_t scale),
setPixels(CRGB* leds);
setPixels(CRGB* leds),
drawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1,CRGB c);
inline void setPixelColorXY(uint16_t x, uint16_t y, uint32_t c) { setPixelColorXY(x, y, byte(c>>16), byte(c>>8), byte(c), byte(c>>24)); }
inline void setPixelColorXY(uint16_t x, uint16_t y, CRGB &c) { setPixelColorXY(x, y, c.red, c.green, c.blue); }