[cairo] rsvg and cairo alpha puzzle
Bertram Felgenhauer
bertram.felgenhauer at googlemail.com
Sat Jan 19 10:34:52 PST 2008
Donn wrote:
> I fetched the librsvg-2.20.0 source and the gnome-python-desktop-2.21.2
> source.
> 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
LD_LIBRARY_PATH=/usr/local/lib
> The code I am using to test this (in Python) is:
[snip]
> 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).
HTH,
Bertram
More information about the cairo
mailing list