Can you Render/Draw to a small sub buffer, and then paste it to the main memory space, like a sprite? #589
Replies: 3 comments 1 reply
-
You may refer to SpriteGif.ino example |
Beta Was this translation helpful? Give feedback.
-
Hi Moon, that example definitely helped, but i dont want to use an offscreen buffer and flush it. I have a live screen thats constantly being written to, and my event loop doesn't support a flush, as there is no "end" of the writing. For the ticker, i want to write it to a "sprite" and then blit that onto the live screen. |
Beta Was this translation helpful? Give feedback.
-
Ok spent a lot of time on this, still fails. I have 4 meg of PSram on this particular device, but as soon as i create a new canvas and draw to it it crashes the ESP32. So there might actually be a hardware issue. Its not an S3 and i think i remember somewhere on your documentation it only works on S3s. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried to use the canvas function as per this example but it was crashing the ESP on boot.
I have noticed that Arduino_Canvas *buffer = new Arduino_Canvas(240, 320, display) has input options for output, outputX and output Y, but i cant find any usage of them.
Definition:
Arduino_Canvas::Arduino_Canvas(
int16_t w, int16_t h, Arduino_G *output, int16_t output_x, int16_t output_y, uint8_t r)
: Arduino_GFX(w, h), _output(output), _output_x(output_x), _output_y(output_y)
Even if i can create a frame buffer that i can use as a target for the drawing functions, and then use gfx->drawBitmap to blit it to the main screen that would be fine.
I just need to know how to create a blank unconnected canvas/buffer to act as a draw target for some drawing functions.
Thank you! Btw, your library is actually pretty fantastic, very fast and works very well for what i need it for. Currently working on UI interface elements. I want to be able to do this drawing sprite stuff to allow a "ticker" to be rendered to the screen with zero flicker. All other screen elements are draw as needed, its just the ticker i want to draw into a sub buffer, then blit it. Will stop all flickering.
My init code:
Beta Was this translation helpful? Give feedback.
All reactions