[cairo] Blitting and sprites in Cairo
donn.ingle at gmail.com
Wed May 15 01:47:31 PDT 2013
How would you move a sprite across a background?
The sprite could be:
draw rectangle 32x32
draw sprite with cairo functions
Draw background once
Copy rect of bg where sprite is gonna go //How do you do this?
translate() //move sprite
paint() //Draw the sprite
//Replace the backdrop
?? //Some kind of set_source + paint again?
That kind of jazz.
Is this the right approach in Cairo? Is there a better way, or a faster
(I'm kinda pining for the old days of vram and rows of bytes! :D)
More information about the cairo