-
Notifications
You must be signed in to change notification settings - Fork 114
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
Proposal: Arduboy2Base::drawBitmap overload #68
Comments
I see no problem with adding this. I'll add it to the ToDo for the next release. |
When would this be useful? |
When someone wants to use
Why would it? In C++ you don't pay for what you don't use - if you aren't using a function then it's not included in the final executable. As I expressly stated in my proposal:
|
This is an idea I had some time ago and suddenly remembered while doing something else.
The idea is that it would be useful to provide an overload of
Arduboy2Base::drawBitmap
that doesn't havewidth
andheight
parameters, and instead extracts those from the image in the same way that theSprites
functions do. I.e. it would be an overload that expects the same image format as theSprites
functions.Key thoughts:
Sprites
-format images to be used withdrawBitmap
drawBitmap
a more viable alternative toSprites
in some situationsSprites::getWidth
andSprited::getHeight
, this hidespgm_read_byte
from inexperienced users.Proposed implementation:
(Note: Intentionally does not rely on
Sprites
to avoid introducing an unnecessary dependency.)The text was updated successfully, but these errors were encountered: