[cairo] Drawing to multiple surfaces, "cairo_recorder", zoom (was: Some newbie question)

Tuom Larsen tuom.larsen at gmail.com
Fri Dec 14 13:47:40 PST 2007


Hello. Yesterday's answers cleared up a lot but they provoked some more.
Please:

- Say an application draws to a window and optionally, if a user would like
to, it exports the drawing to PDF. How? If I understood Carl's
recommendation correctly -- to use "data structures [which] know how to
'draw themselves' given a cairo context -- I probably could write some dummy
drawing functions (lineto, circle, stroke, ...) which would just record [1]
the drawing operations (and serialize to disk, e.g. in a text file). Later,
I could parse that file and execute the real drawing function of a given
surface. Does it make sense to you?

- And a bit off topic, how does a zoom work? I mean, say there's a GTK
window and I draw to it. Since it is raster now I can't really scale it,
right? So I have to redraw it at the new scale, right? How, because all the
drawing operations are lost now since I draw a raster image in the first
place? Could a recording from the previous question be of some help?

Well, I apologize for possibly "basic" questions, hopefully they make at
least a bit sense... Thanks!

[1] like
http://lists.cairographics.org/archives/cairo/2006-December/009013.html

T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20071214/166abca8/attachment.html 


More information about the cairo mailing list