[cairo] rsvg and cairo alpha puzzle
bertram.felgenhauer at googlemail.com
Sat Jan 19 10:34:52 PST 2008
> I fetched the librsvg-2.20.0 source and the gnome-python-desktop-2.21.2
> I compiled librsvg first, default configure. No errors.
So it's probably in /usr/local/lib/librsvg.so now.
> Then I did the other gnome-python one. No errors.
> The paths are screwball, but I moved the rsvg.so and .la files into
> my /usr/lib/python2.5/site-packages/gtk-2.0 directory
> From the output of both make install, it *seems* that everything is pointing
> to the latest librsvg sources etc.
> I can't get a version number from 'rsvg' via python, but rsvg.__file__ shows
> it's pointing to the expected rsvg.so file.
rsvg.so is the python module. which librsvg.so does 'ldd rsvg.so'
point to? I'd bet it's not the right one. Try playing with
> The code I am using to test this (in Python) is:
> class Shapes ( Screen ):
> def draw(self, cr, width, height):
> cr.translate ( 200, 210 )
> # When you remark 1,2 & 3 below, the translate above
> # no longer works.
> #cr.push_group ( ) # 1. remark this
> obj.render_cairo ( cr )
> #cr.pop_group_to_source ( ) # 2. remark this
> #cr.paint_with_alpha ( 0.5 ) # 3. remark this
works for me after uncommenting the marked lines (and getting
gnome-python-desktop to work).
More information about the cairo