Announce: Framebuffer::GFX and FastLED_SPITFT::GFX

a) shouldn’t defining SUPPORT_ADAFRUIT_GFX_LIBRARY be enough?

SUPPORT_ADAFRUIT_GFX_LIBRARY just tells SmartMatrix Library to include Adafruit_GFX. I suppose I could have made it so if you define SUPPORT_ADAFRUIT_GFX_LIBRARY the library switches BackgroundLayer to use BackgroundLayer_GFX, but I didn’t think of that, and don’t see a big reason to change that functionality now.

b) if there are costs/drawbacks to enabling it, and that’s why you didn’t make it default, can you give more details on that?

The main reasons I didn’t make it default was:

  1. backwards compatibility - at a minimum you need to change FastLED code to cast CRGB as rgb24
  2. I haven’t tested this new code enough and there are likely bugs
  3. It makes using SmartMatrix Library dependent on Adafruit_GFX, and I didn’t want a required dependency
  4. The scrolling text functionality requires a different amount of RAM allocated - it used to be just the pixels for the whole layer, now it’s the pixels to hold the string - which requires more RAM for larger fonts/longer strings.

Obviously adafruit::gfx is only 16bpp while you allow all the way to 36bpp.

I used the passthrough trick, so rgb24/rgb48 should be supported without downgrading to uint16_t:

Basically it’d be great to have a GFX section in your README.md, explaining some of the points above :slight_smile:

Yes, documentation has always been lacking. I’m trying to improve things by making the Wiki the documentation hub for SmartMatrix Library, as it’s easier to maintain than my separate docs site, and I can open it up for anyone to contribute. I need to document Layer functionality, and this will be part of that documentation.