Replies: 1 comment 2 replies
-
I never really used SCISSOR_XY or SCISSOR_SIZE as usually EVE works more the opposite way, use tiles to compose a bigger picture. The image is still drawn at 0/0, SCISSORS is just a window to that canvas. And you likely want to use SAVE_CONTEXT / RESTORE_CONTEXT as well. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
I don't know if that seems complicated or if I miss something obvious. When I use SDL on desktop apps I create an image with a predefined set of tiles and I crop a specific square that I draw on the screen so that you can load only one large image rather than individual bitmaps.
It looks like we can use either translate or scissors function but I'm unable to draw my clipped rectangle on the desired position.
For the example, using this 80x80 image:
I would like to cut the purple part and draw it at position 0x0 on the screen. for that, I can either use translate or scissor but in both case I get the same result. It's only the purple part that is shown on the screen but exactly like if the whole image was draw at 0x0. Ending with this output on my display:
Any idea or documentations example I can follow? On the BRT_AN_033 note I have not found/understood how to do to that.
Beta Was this translation helpful? Give feedback.
All reactions