Unofficial Nextion/TJC User Forum

Moving picture over the screen. "pic" command and clearing?

I’m using the “pic 400,200,28” command to put a picture on the display (1 of many). Every second I need to move this picture to a different location. Each picture is moving on the screen. How can I delete the printed/displayed picture again?

It would be great if when the picture is put on the screen, you have some kind of a pointer or picture ID returned so that the picture can be deleted at a later stage.

Using the CLS command is not going to work as I need to fill my screen with a color and then I lose my background picture.

The Nextion has no GPU with multi-layer frame buffer. Thus, a pic or picq command will simply do an unbuffered overwrite of the corresponding pixels. Deleting an area can only be done by redrawing either the full screen background or another pic(q) command covering the same area out of a full screen background picture.
It looks like on the intelligent series, there is a layering concept which should even allow to move components around. But this does not cover pictures drawn with generic GUI commands.

Thanks for your feedback, indeed I’ve selected the intelligent serie.
I will start playing around with redrawing the background information each time. Will be a challenge to manage but let’s see.
Indeed, there is a layering concept, but I’ve not found out about how to use it and what the advantage is. Any thoughts?


This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).