ESP32-HUB75-MatrixPanel-DMA icon indicating copy to clipboard operation
ESP32-HUB75-MatrixPanel-DMA copied to clipboard

Support FastLED CRGB for drawPixel

Open ModischFabrications opened this issue 2 years ago • 2 comments

Manual conversion from CRGB to raw draw Call is needlessly complicated:

CRGB color = CRGB(1,2,3);
screen->drawPixelRGB888(sn.pos[0].x, sn.pos[0].y, color.r, color.g, color.b);

could be

screen->drawPixel(sn.pos[0].x, sn.pos[0].y, color);

ModischFabrications avatar Jan 29 '22 23:01 ModischFabrications

Some more background: I often need advanced functions for gradients, blending and more, which is much easier with FastLED. On the other hand, text support from Adafruit GFX is nice. Seems like both could be supported, at least with a hidden conversion.

Looking through it it seems like these methods are excluded with compiler flag USE_GFX_ROOT, but it seems like that would enable and disable a whole lot of other stuff...

ModischFabrications avatar Jan 30 '22 00:01 ModischFabrications

I suggest you modify the library and enable the code that's not compiled when 'USE_GFX_ROOT' is disabled.

Then include FastLED instead of 'GFX Root' etc.

I don't want this library to have a dependancy on FastLED.

Looking through it it seems like these methods are excluded with compiler flag USE_GFX_ROOT, but it seems like that would enable and disable a whole lot of other stuff...

Not quite sure what that is? GFX_ROOT is my hack of AdafruitGFX but modified for CRGB.

mrcodetastic avatar Feb 06 '22 17:02 mrcodetastic