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

Carl Worth cworth at cworth.org
Fri Dec 14 16:22:58 PST 2007


On Sat, 15 Dec 2007 00:05:53 +0100, "Tuom Larsen" wrote:
> On Dec 14, 2007 11:13 PM, Carl Worth <cworth at cworth.org> wrote:
> > On Fri, 14 Dec 2007 22:47:40 +0100, "Tuom Larsen" wrote:
> > > - Say an application draws to a window and optionally, if a user would
> > > like to, it exports the drawing to PDF. How?
...
> 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?

> Yes, I see, thanks. But consider this:
> - The drawing is the result of some heavy computation - now it would have to
> run twice.

Or else you cache the result of that heavy compilation somehow. This
still looks like an application-specific issue to me. It's not cairo's
job to provide data structures to store the results of arbitrary
computation, see?

Do recall what I said earlier that the application likely has to be
able to repaint its window anyway.

Meanwhile, I don't discount that an exposed meta-surface in cairo
would definitely be useful. I still don't think it would solve all
such prolems in applications though. You're still going to want good
data application-specific data structures for anything you want to
draw.

> - 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.).

Anything application-specific is going to win hands-down.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071214/d7f75a39/attachment-0001.pgp 


More information about the cairo mailing list