Loading an image from LittleFS into a Sprite #3532
Replies: 2 comments 1 reply
-
Hi,
in while loop: 240,240 is the display resolution, 135,68 is the second image resolution as an example |
Beta Was this translation helpful? Give feedback.
-
Sorry for the delay in responding. I am away on a short vacation but this looks PERFECT! I figured it would be something like that. I will try it as soon as I get back later next week. I will let you know how it works but like I said, I expect that this is exactly what I needed. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
I have an application that displays a "wedge" gauge. (The shape is narrower at the left end and gets larger towards the right. ) The gauge graphic is in a 100x100 sprite. My intention is to display the value by creating two rectangles within the sprite. The first has the width of the value to be shown. The second starts where the first one ends and fills out the remaining area to the right. To create the wedge appearance, I want to then load an image into the sprite that has a transparent region with the wedge shape. Once that is loaded, I would push the sprite.
As a test, I create the two part rectangle, pushed the sprite, and then just drew the image file from LittleFS over it. It works but of course it flickers because the whole rectangle is drawn and then the mask is applied.
Your suggestions are most appreciated.
Beta Was this translation helpful? Give feedback.
All reactions