@@ -122,6 +122,10 @@ bool strip_uses_global_leds(void); // WLEDMM implemented in FX_fcn.
122122#define PURPLE (uint32_t )0x400080
123123#define ORANGE (uint32_t )0xFF3000
124124#define PINK (uint32_t )0xFF1493
125+ #define GREY (uint32_t )0x808080
126+ #define GRAY GREY
127+ #define DARKGREY (uint32_t )0x333333
128+ #define DARKGRAY DARKGREY
125129#define ULTRAWHITE (uint32_t )0xFFFFFFFF
126130#define DARKSLATEGRAY (uint32_t )0x2F4F4F
127131#define DARKSLATEGREY (uint32_t )0x2F4F4F
@@ -614,22 +618,22 @@ typedef struct Segment {
614618 // 1D strip
615619 uint16_t virtualLength (void ) const ;
616620 void setPixelColor (int n, uint32_t c); // set relative pixel within segment with color
617- void setPixelColor (int n, byte r, byte g, byte b, byte w = 0 ) { setPixelColor (n, RGBW32 (r,g,b,w)); } // automatically inline
618- void setPixelColor (int n, CRGB c) { setPixelColor (n, RGBW32 (c.r ,c.g ,c.b ,0 )); } // automatically inline
621+ inline void setPixelColor (int n, byte r, byte g, byte b, byte w = 0 ) { setPixelColor (n, RGBW32 (r,g,b,w)); } // automatically inline
622+ inline void setPixelColor (int n, CRGB c) { setPixelColor (n, RGBW32 (c.r ,c.g ,c.b ,0 )); } // automatically inline
619623 void setPixelColor (float i, uint32_t c, bool aa = true );
620- void setPixelColor (float i, uint8_t r, uint8_t g, uint8_t b, uint8_t w = 0 , bool aa = true ) { setPixelColor (i, RGBW32 (r,g,b,w), aa); }
621- void setPixelColor (float i, CRGB c, bool aa = true ) { setPixelColor (i, RGBW32 (c.r ,c.g ,c.b ,0 ), aa); }
624+ inline void setPixelColor (float i, uint8_t r, uint8_t g, uint8_t b, uint8_t w = 0 , bool aa = true ) { setPixelColor (i, RGBW32 (r,g,b,w), aa); }
625+ inline void setPixelColor (float i, CRGB c, bool aa = true ) { setPixelColor (i, RGBW32 (c.r ,c.g ,c.b ,0 ), aa); }
622626 uint32_t __attribute__ ((pure)) getPixelColor(int i); // WLEDMM attribute added
623627 // 1D support functions (some implement 2D as well)
624628 void blur (uint8_t , bool smear = false );
625629 void fill (uint32_t c);
626630 void fade_out (uint8_t r);
627631 void fadeToBlackBy (uint8_t fadeBy);
628632 void blendPixelColor (int n, uint32_t color, uint8_t blend);
629- void blendPixelColor (int n, CRGB c, uint8_t blend) { blendPixelColor (n, RGBW32 (c.r ,c.g ,c.b ,0 ), blend); }
633+ inline void blendPixelColor (int n, CRGB c, uint8_t blend) { blendPixelColor (n, RGBW32 (c.r ,c.g ,c.b ,0 ), blend); }
630634 void addPixelColor (int n, uint32_t color, bool fast = false );
631- void addPixelColor (int n, byte r, byte g, byte b, byte w = 0 , bool fast = false ) { addPixelColor (n, RGBW32 (r,g,b,w), fast); } // automatically inline
632- void addPixelColor (int n, CRGB c, bool fast = false ) { addPixelColor (n, RGBW32 (c.r ,c.g ,c.b ,0 ), fast); } // automatically inline
635+ inline void addPixelColor (int n, byte r, byte g, byte b, byte w = 0 , bool fast = false ) { addPixelColor (n, RGBW32 (r,g,b,w), fast); } // automatically inline
636+ inline void addPixelColor (int n, CRGB c, bool fast = false ) { addPixelColor (n, RGBW32 (c.r ,c.g ,c.b ,0 ), fast); } // automatically inline
633637 void fadePixelColor (uint16_t n, uint8_t fade);
634638 uint8_t get_random_wheel_index (uint8_t pos);
635639 uint32_t __attribute__ ((pure)) color_from_palette(uint_fast16_t , bool mapping, bool wrap, uint8_t mcol, uint8_t pbri = 255 );
@@ -665,6 +669,7 @@ typedef struct Segment {
665669 inline void setPixelColorXY (unsigned x, unsigned y, uint32_t c) { setPixelColorXY (int (x), int (y), c); }
666670 inline void setPixelColorXY (int x, int y, byte r, byte g, byte b, byte w = 0 ) { setPixelColorXY (x, y, RGBW32 (r,g,b,w)); }
667671 inline void setPixelColorXY (int x, int y, CRGB c) { setPixelColorXY (x, y, RGBW32 (c.r ,c.g ,c.b ,0 )); }
672+ inline void setPixelColorXY (unsigned x, unsigned y, CRGB c) { setPixelColorXY (int (x), int (y), RGBW32 (c.r ,c.g ,c.b ,0 )); }
668673 // #ifdef WLED_USE_AA_PIXELS
669674 void setPixelColorXY (float x, float y, uint32_t c, bool aa = true , bool fast=true );
670675 inline void setPixelColorXY (float x, float y, byte r, byte g, byte b, byte w = 0 , bool aa = true ) { setPixelColorXY (x, y, RGBW32 (r,g,b,w), aa); }
@@ -673,29 +678,31 @@ typedef struct Segment {
673678 uint32_t __attribute__ ((pure)) getPixelColorXY(int x, int y);
674679 // 2D support functions
675680 void blendPixelColorXY (uint16_t x, uint16_t y, uint32_t color, uint8_t blend);
676- void blendPixelColorXY (uint16_t x, uint16_t y, CRGB c, uint8_t blend) { blendPixelColorXY (x, y, RGBW32 (c.r ,c.g ,c.b ,0 ), blend); }
681+ inline void blendPixelColorXY (uint16_t x, uint16_t y, CRGB c, uint8_t blend) { blendPixelColorXY (x, y, RGBW32 (c.r ,c.g ,c.b ,0 ), blend); }
677682 void addPixelColorXY (int x, int y, uint32_t color, bool fast = false );
678- void addPixelColorXY (int x, int y, byte r, byte g, byte b, byte w = 0 , bool fast = false ) { addPixelColorXY (x, y, RGBW32 (r,g,b,w), fast); } // automatically inline
679- void addPixelColorXY (int x, int y, CRGB c, bool fast = false ) { addPixelColorXY (x, y, RGBW32 (c.r ,c.g ,c.b ,0 ), fast); }
683+ inline void addPixelColorXY (int x, int y, byte r, byte g, byte b, byte w = 0 , bool fast = false ) { addPixelColorXY (x, y, RGBW32 (r,g,b,w), fast); } // automatically inline
684+ inline void addPixelColorXY (int x, int y, CRGB c, bool fast = false ) { addPixelColorXY (x, y, RGBW32 (c.r ,c.g ,c.b ,0 ), fast); }
680685 void fadePixelColorXY (uint16_t x, uint16_t y, uint8_t fade);
681686 void box_blur (uint16_t i, bool vertical, fract8 blur_amount); // 1D box blur (with weight)
682687 void blurRow (uint32_t row, fract8 blur_amount, bool smear = false );
683688 void blurCol (uint32_t col, fract8 blur_amount, bool smear = false );
684689 void moveX (int8_t delta, bool wrap = false );
685690 void moveY (int8_t delta, bool wrap = false );
686691 void move (uint8_t dir, uint8_t delta, bool wrap = false );
687- void draw_circle (uint16_t cx, uint16_t cy, uint8_t radius, CRGB c);
688- void fill_circle (uint16_t cx, uint16_t cy, uint8_t radius, CRGB c);
689- void drawLine (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t c);
690- void drawLine (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, CRGB c) { drawLine (x0, y0, x1, y1, RGBW32 (c.r ,c.g ,c.b ,0 )); } // automatic inline
692+ void drawCircle (uint16_t cx, uint16_t cy, uint8_t radius, uint32_t c, bool soft = false );
693+ inline void drawCircle (uint16_t cx, uint16_t cy, uint8_t radius, CRGB c, bool soft = false ) { drawCircle (cx, cy, radius, RGBW32 (c.r ,c.g ,c.b ,0 ), soft); }
694+ void fillCircle (uint16_t cx, uint16_t cy, uint8_t radius, uint32_t c, bool soft = false );
695+ inline void fillCircle (uint16_t cx, uint16_t cy, uint8_t radius, CRGB c, bool soft = false ) { fillCircle (cx, cy, radius, RGBW32 (c.r ,c.g ,c.b ,0 ), soft); }
696+ void drawLine (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t c, bool soft = false );
697+ inline void drawLine (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, CRGB c, bool soft = false ) { drawLine (x0, y0, x1, y1, RGBW32 (c.r ,c.g ,c.b ,0 ), soft); } // automatic inline
691698 void drawArc (uint16_t x0, uint16_t y0, uint16_t radius, uint32_t color, uint32_t fillColor = 0 );
692- void drawArc (uint16_t x0, uint16_t y0, uint16_t radius, CRGB color, CRGB fillColor = BLACK) { drawArc (x0, y0, radius, RGBW32 (color.r ,color.g ,color.b ,0 ), RGBW32 (fillColor.r ,fillColor.g ,fillColor.b ,0 )); } // automatic inline
699+ inline void drawArc (uint16_t x0, uint16_t y0, uint16_t radius, CRGB color, CRGB fillColor = BLACK) { drawArc (x0, y0, radius, RGBW32 (color.r ,color.g ,color.b ,0 ), RGBW32 (fillColor.r ,fillColor.g ,fillColor.b ,0 )); } // automatic inline
693700 void drawCharacter (unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, uint32_t color, uint32_t col2 = 0 );
694- void drawCharacter (unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, CRGB c, CRGB c2) { drawCharacter (chr, x, y, w, h, RGBW32 (c.r ,c.g ,c.b ,0 ), RGBW32 (c2.r ,c2.g ,c2.b ,0 )); } // automatic inline
701+ inline void drawCharacter (unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, CRGB c, CRGB c2) { drawCharacter (chr, x, y, w, h, RGBW32 (c.r ,c.g ,c.b ,0 ), RGBW32 (c2.r ,c2.g ,c2.b ,0 )); } // automatic inline
695702 void wu_pixel (uint32_t x, uint32_t y, CRGB c);
696- void blur1d (fract8 blur_amount); // blur all rows in 1 dimension
703+ // void blur1d(fract8 blur_amount); // blur all rows in 1 dimension
697704 void blur2d (fract8 blur_amount) { blur (blur_amount); }
698- void fill_solid (CRGB c) { fill (RGBW32 (c.r ,c.g ,c.b ,0 )); }
705+ inline void fill_solid (CRGB c) { fill (RGBW32 (c.r ,c.g ,c.b ,0 )); }
699706 void nscale8 (uint8_t scale);
700707 bool jsonToPixels (char *name, uint8_t fileNr); // WLEDMM for artifx
701708 #else
@@ -704,6 +711,7 @@ typedef struct Segment {
704711 inline void setPixelColorXY (unsigned x, unsigned y, uint32_t c) { setPixelColor (int (x), c); }
705712 inline void setPixelColorXY (int x, int y, byte r, byte g, byte b, byte w = 0 ) { setPixelColor (x, RGBW32 (r,g,b,w)); }
706713 inline void setPixelColorXY (int x, int y, CRGB c) { setPixelColor (x, RGBW32 (c.r ,c.g ,c.b ,0 )); }
714+ inline void setPixelColorXY (unsigned x, unsigned y, CRGB c) { setPixelColor (int (x), RGBW32 (c.r ,c.g ,c.b ,0 )); }
707715 // #ifdef WLED_USE_AA_PIXELS
708716 inline void setPixelColorXY (float x, float y, uint32_t c, bool aa = true ) { setPixelColor (x, c, aa); }
709717 inline void setPixelColorXY (float x, float y, byte r, byte g, byte b, byte w = 0 , bool aa = true ) { setPixelColor (x, RGBW32 (r,g,b,w), aa); }
@@ -722,9 +730,12 @@ typedef struct Segment {
722730 inline void moveX (int8_t delta, bool wrap = false ) {}
723731 inline void moveY (int8_t delta, bool wrap = false ) {}
724732 inline void move (uint8_t dir, uint8_t delta, bool wrap = false ) {}
725- inline void fill_circle (uint16_t cx, uint16_t cy, uint8_t radius, CRGB c) {}
726- inline void drawLine (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t c) {}
727- inline void drawLine (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, CRGB c) {}
733+ inline void drawCircle (uint16_t cx, uint16_t cy, uint8_t radius, uint32_t c, bool soft = false ) {}
734+ inline void drawCircle (uint16_t cx, uint16_t cy, uint8_t radius, CRGB c, bool soft = false ) {}
735+ inline void fillCircle (uint16_t cx, uint16_t cy, uint8_t radius, uint32_t c, bool soft = false ) {}
736+ inline void fillCircle (uint16_t cx, uint16_t cy, uint8_t radius, CRGB c, bool soft = false ) {}
737+ inline void drawLine (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t c, bool soft = false ) {}
738+ inline void drawLine (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, CRGB c, bool soft = false ) {}
728739 inline void drawCharacter (unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, uint32_t color, uint32_t = 0 , int8_t = 0 ) {}
729740 inline void drawCharacter (unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, CRGB color) {}
730741 inline void drawCharacter (unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, CRGB c, CRGB c2, int8_t rotate = 0 ) {}
0 commit comments