[cairo] Cairo and rsvg
donn.ingle at gmail.com
Wed Apr 8 09:45:35 PDT 2009
> get_dimensions() returns the object's bounding box.
> get_position() returns the upper left (x,y) coordinate of the object, iirc.
Okay, thanks. I will have to figure out how to access those via Python -- it's
not obvious to me right now.
I am working with:
That (I think) is the latest code showing what can be done from Python. I
can't see any hint of passing an id through to the get_dimension_data
I am looking for something simple like:
handle = rsvh.Handle('afile.svg')
Is there no way to get the path_data from inside rsvg?
Anyone on the list have a way via some Ctypes hacking (or other clever voodoo)
to imitate something like this:
handle = rsvg.Handle('afile.svg')
path=handle.extractPath(id="#some_path") # Assumes a simple path.
* I am *really* rusty on my PyCairo. Really not sure if one can get a path and
then spool it out to a context or if the only option is to use the various
drawing commands to draw it out.
Where I web: http://otherwise.relics.co.za/
Comics, tutorials, software and sundry
More information about the cairo