[cairo] Cairo and rsvg
Donn
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.
P1
I am working with:
http://svn.gnome.org/viewvc/gnome-python-desktop/trunk/rsvg/rsvg.override?revision=426&view=markup/
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
function.
I am looking for something simple like:
handle = rsvh.Handle('afile.svg')
(w,h)=handle.getSize(id="#fat_blue_python")
P2
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.
ctx.drawPath(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.
\d
--
Where I web: http://otherwise.relics.co.za/
Comics, tutorials, software and sundry
More information about the cairo
mailing list