[cairo] can you divide the surface into "tiles"?
pacomako at gmail.com
Mon Apr 29 05:03:52 PDT 2013
I'm a student working for an university project and I'm fairly new to the
"cairo world", sorry if my question may seem trivial to you but I cannot
find an answer in the documentation (and the fact that english is not my
first language didn't help at all).
I'm trying to create a graphical interface for a simple 2d videogame and I
need a simple and pratical way to represent the game's world.
My idea was to create a .png image of the world then load it into a gtk
window, then if something changes in the game (for example the character
moves) recreate the .png image with the newer information and reload it in
the window and so on.
To do this I need to divide the surface where I'm drawing the scenary into
"tiles" (as suggested me in the gtk mailing list) and draw/update them
while the game goes on.
Is there any way to do this? (and maybe give a name at every tiles so I can
reference them in every update?)
Thanks for your help, I hope I've explained my problem clearly.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo