[sugar] New version of piemenu.py, and some cairo questions

Antoine van Gelder hummingbird
Wed Feb 28 03:54:20 EST 2007


Don Hopkins wrote:
> Can you please recommend a good source of documentation about pycairo 
> and pango from a python programmer's point of view?


I don't think there is any :-)


> I'd love to know the trick to reading SVG files, please -- that would really work well 
> with pie menus, especially once I get some cool scaling and rotating feedback 
> implemented.
> Is there a way to load an SVG file into a surface cache with a 
transparent background?
> How do you measure an SVG file's size, or do you have to know what size to render it? 

* Load svg file into a surface cache w/ transparent background:

Have a look at _make_buffer() in 
http://196.211.3.106/cgi-bin/trac.cgi/browser/Survival/ontology/thing.py

[ a self.svg can be constructed w/ self.svg = rsvg.Handle('filename') ]


* Measuring svg files size / knowing what size to render it:

Gnnnngggg. Ask me again when I'm not halfway through changing how I 
handle transforms in my code and feel like I'm a privileged observer of 
an absolute space time continuum!!

You should be able to get a better idea from the code ref above than 
anything I could come up with in my current mood.

Hope this helps!

  - antoine


More information about the Sugar-devel mailing list