Part of a sprite draw #864
-
What is the best way to draw only a part of a sprite to a certain position on the TFT display? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Use this function. |
Beta Was this translation helpful? Give feedback.
-
I didn't know that 'pushSprite' can also be called with a window. For others: // Push a windowed area of the sprite to the TFT at tx, ty |
Beta Was this translation helpful? Give feedback.
-
Example use:
|
Beta Was this translation helpful? Give feedback.
-
Wouldn't it be great if the function with a window in the destination was also possible for pushToSprite? |
Beta Was this translation helpful? Give feedback.
-
Use the setViewport function to set a viewport window in the destination sprite, then pushToSprite with the required coordinate offsets. |
Beta Was this translation helpful? Give feedback.
Example use: