[cairo] MOZ-SVG-cairo (was: usable libsvg-cairo?)

Carl Worth cworth at cworth.org
Thu May 12 17:43:59 PDT 2005


On Thu, 12 May 2005 19:51:20 -0400, Liam Breck wrote:
> What we want is simply an SVG-based API for cairo, so you can write:
>   XxSvgRect(aContext, aSvgParameters);
>   XxSvgTspan(aContext, aSvgParameters, textbuf, textlen);

I'm still not clear on what you want here. You mentioned earlier in
the thread that you didn't want this library to do SVG parsing. So
what's left in an "SVG-based API for cairo"? If it's just an
immediate-mode drawing API with an SVG flavor, then I would propose
that cairo provides a better immediate-mode API anyway. But if you did
want that, there's not really a lot of work involved, and it's
basically done already in libsvg-cairo/src/svg_cairo.c:

But I imagine you might want a lot more than just that.

> I don't want to duplicate the work of libsvg-cairo or librsvg if not
> necessary; is my impression that these projects are not evolving as fast as
> Moz-SVG correct?

In this context, libsvg-cairo and librsvg should be considered one
work. They share common heritage and we'd like to get them re-merged
at some point, (librsvg has gained filters and CSS support since
libsvg-cairo split off, and librsvg is now getting support for
multiple backends so it should be able to start drawing with cairo
soon).

So this codebase provides a fairly complete base for static SVG, but
nothing dynamic yet. As far as static SVG goes, I'm not aware that
there is a lot of evolving that needs to happen here.

If it's the dynamic parts of SVG that you want, (which I'm guessing it
is), then some new work is needed. I haven't compared the
librsvg/libsvg-cairo stuff closely enough with the Mozilla stuff to
posit a guess as to which might make a better base for a standalone
dynamic SVG library.

One approach might be to make a retained-mode "canvas" on top of
cairo and then do the dynamic SVG stuff on top of that. That canvas
library would be quite useful to a fair number of other projects.

-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.freedesktop.org/archives/cairo/attachments/20050512/e576b507/attachment.pgp


More information about the cairo mailing list