-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for multicolor pixmaps in drawRGBBitmap. #39
Conversation
You can find example code using this new library call here: |
I just had one of my users confused because he was using the wrong GFX library (yours, not mine) and I just realized that I still have a fork from you because of this patch. |
As a followup, I have tested this code with adafruit_neomatrix, and it works out of the box. |
Just heading out for a weekend thing but will have a good look and likely merge this when I get back. I've been hesitant to add 565-specific functions to core GFX, but after some things went not-so-well in one of the subclasses, this might just be the way to go. Tangent ideas are brewing, this'll be a good starting point. Thanks! |
@PaintYourDragon thanks for the reply. For what it's worth, this code is not 565 specific at all. I wrote it for my own backend that happens to be 444 BGR and then used it unmodified on 565 RGB neomatrix and it just worked for both because it passes the 16 bits of colors unmodified without caring how they are interpreted by the backend after that. |
During testing, I found it helpful to be able to display bitmaps that have been generated or modified in RAM, so I made a small change to allow this. |
Neomatrix demo that uses this code: https://github.com/marcmerlin/Adafruit_NeoMatrix/tree/master/examples/MatrixGFXDemo |
this issue was raised over 2 years ago i think it would be prudent to add this minor change to this wonderful library. |
@pacav69 . He already replied that he was going to review it soon. Please give him a chance to :) |
@marcmerlin i know i just thought i would give him a nudge and give you a helping hand as it is most annoying that i have to use a different version so that i can compile your code. |
Hi @PaintYourDragon I now have 3 different demos on 3 different backends that depend on this patch. It is nice to be able to display multi color pixmaps on totally different backends that happen to support Adafruit::GFX even though they don't even have the same color bit depth. |
@PaintYourDragon |
Thanks a bunch. |
Thanks for your patience, was handling a variety of other things. Minor detail, I might go in and tweak this to have separate const (PROGMEM) and non-const (RAM) versions, consistent with the existing drawBitmap() functions, rather than the extra parameter. |
Understood. If you do so, I'll modify the code that calls into it and send updated demo patches, no problem at all. |
OK yeah, for consistency with other bitmap-related functions I've broken it out into PROGMEM- and RAM-resident versions of the function (instead of a trailing progmem argument). Also added a variant that lets you additionally pass a bitmask to make non-rectangular overlays. |
Some cleanup, a fix for PortReg, ESP8266 fixes, ARM fixes, and more... (covers most of adafruit#25, adafruit#30, adafruit#32, adafruit#36, adafruit#39, adafruit#40)
This adds support for multicolor bitmaps as supported by my software PWM matrix driver