Repository navigation
tft.readRect, pushImage and pushRect together with tft.swapBytest true or false #3928
Unanswered
Tutorius
asked this question in
Q&A - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
i have one of these CYDs (a version with shared pins for display and touch) and most things work. I can draw pixels, rectangles, push images to teh display.
When i try to save a region of the display before pushing a image to that area, i have some problems.
It works once:
Set Swapbytes to false -> readRect to save the display-info of that area -> set swapbytes to true -> push an image to the area -> and later (with still setswapbaytes true) restore the are by pushRect
What does not work:
I have six rectangular buttons as images, and want to set them like shown above. SwapBytes to false, read all six areas, swap bytes to true, push the images, all OK
But reloading the areas by setSwapBytes ture, push Rectangles somehow scrambles the screen by changing colors.
What do i need to do to show n buttons, with saving the Screen before, and reloading the screen when buttons should be erased?
Thanks for your help
Code:
Drawing the images, saving the info before:
Redrawing the saved rectangles:
All reactions