[cairo] rsvg cairo and the size-22

Dominic Lachowicz domlachowicz at gmail.com
Mon Jul 12 08:10:03 PDT 2010

Unless I mis-understand you, RSVG has a method to get the SVG's size.
If there's no size in the SVG, RSVG does a "render" onto a nil surface
in order to determine the SVG's bounding box.

On Mon, Jul 12, 2010 at 10:57 AM, donn <donn.ingle at gmail.com> wrote:
> Hi,
> I am working from xml elements, passing them out to python-rsvg and telling
> it to render. This is fine as long as I know what size that element should
> be.
> The "size-22" is when I don't: I need to know the size before I can render
> the svg, but I can't calculate it until I have rendered it!
> Is there some well-thumbed way to deal with this?
> I am thinking of creating a very large tmp surface, rendering into it and
> then asking the context (or rsvg) for the stroke/fill size and then clipping
> that out and ... well it gets fuzzy. I have to get that cut-out into Clutter
> (python-clutter 1.0's CairoTexture actor) somehow.
> (It's either that or rendering everything *twice*, which just offends my
> inner-coder :) )
> Any hope?
> \d
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo

"I like to pay taxes. With them, I buy civilization." --  Oliver Wendell Holmes

More information about the cairo mailing list