[cairo] rsvg cairo and the size-22 [SOLVED]
donn.ingle at gmail.com
Mon Jul 12 11:31:41 PDT 2010
On 12/07/2010 19:53, Dominic Lachowicz wrote:
> rsvg_handle_get_dimensions() doesn't require you to pass it a cairo
> context first.
You, sir, are a freaking genius! That's a great tip, and reading the
docs I would never have worked that out.
For the record:
Where: s = "some/path/somefile.svg" or s="<svg ...>...</svg>"
h = rsvg.Handle( file=s ) or ( data=s )
d = h.get_dimension_data()
Watch out for stray width/height attributes in the <svg> tag, they seem
to take priority over the actual dimensions of any other tags.
Sorted, many thanks.
More information about the cairo