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

Dirk Schönberger dirk.schoenberger at sz-online.de
Sat Dec 15 01:27:47 PST 2007


> > But the drawing would be a raster image embeded in PDF, no? Well unless
I
> > switch to a vector surface target, as you suggest bellow?

> I don't follow. How else would you be generating a PDF surface other
> than using a vector surface target?

As far as I understand this, the basic problem is that the choice of the
first surface determines what you can do with it later.
If you start with a image based surface, you cannot later swith to a vector
based.
If you start with a vector based surface, say, SVG or PDF, you may have to
provide information which are redundant, say the output file
name, if you only want to use the vector surface, without intention to
actually create some files.

> > - How to pass the targeting surface through network or pipe? (Simple,
you
> > [I] don't. You [I] send the drawing source code.)
> > Please, I certainly don't want to exaggerate.

> Again, that looks like something entirely outside of cairo's scope. As
> I said previously, even if we *did* immediately expose cairo's
> meta-surface code we still wouldn't have serialization/deserialization
> code. And even if we *did* write new serialization/deserialization
> code based on the current meta-surface implementation it would likely
> not be at all efficient, (repeating copies of source surface state,
> etc.).

Why would you have to keep copies of the state? Wouldn't it be easier if you
store / serialize a sequence of the process, ie. the actions
which lead to this state? I think this would be much easier to be
"replayable", including replay in other contexts, say, scaled by 2.0 by
adding
cairo functions before and after replaying the recorded sequence.

Regards
Dirk



More information about the cairo mailing list