[cairo] Some newbie question

Tuom Larsen tuom.larsen at gmail.com
Thu Dec 13 14:58:44 PST 2007


On Dec 13, 2007 10:14 PM, Carl Worth <cworth at cworth.org> wrote:

>
> > If I understand correctly (maybe I even read it somewhere), there are
> > basically to "kinds" of surfaces - the ones which do preserve drawing
> > operations (PDF, SVG, ...) and the ones which do not (xlib, image, ...).
> Is
> > it so?
>
> Yes, definitely. Those are basically vector vs. raster surfaces in
> cairo.
>

Maybe I overlooked something or it's very much obvious but is this in the
docs somewhere? Because from API reference manual all the Surfaces look
fairly equal -- a FAQ candidate? (I'm not sure about that F, though).


>
>
> > My original thought was that I will create an Image (or meta) surface,
> do
> > all the drawing, then serialize this surface via programming language (
> e.g.
> > in python via pickle) and then reuse. In that way i wouldn't need to use
> > Poppler or librsvg.
>
> So there's not really anything like that in cairo.
>
> What I would recommend is that in your program you have your own data
> structures, and write code so that those data structures know how to
> "draw themselves" given a cairo context. Then, you can pickle (or
> otherwise serialize) your objects and draw them with cairo however
> you'd like.
>
> Does that make sense for your application?


Ok, that's cool, have to think about it. Thanks!

T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20071213/3fe1fd14/attachment-0001.htm 


More information about the cairo mailing list