[wxPython-users] wxGCDC on GTK2

Kevin Ollivier kevino at theolliviers.com
Thu Mar 8 10:42:11 PST 2007


Hi Robin,

On Mar 7, 2007, at 10:50 PM, Robin Dunn wrote:

> Bryan Cole wrote:
>> Hi,
>> Can anyone tell me the status of wxGraphicsContext / wxGCDC with
>> wxPython-GTK2 ?
>> I'm using the wxPython2.8-gtk2-ansi-2.8.0.1-fc4_py2.4
>> rpms binaries from the SourceForge site and also the 2.8.0.1- 
>> version of
>> the wxPython demos. The wxGraphicsContext demos don't work as  
>> described.
>> (and testing it interactively gives a "NotImplementedError").
>> Do I need to rebuild the binaries with wxGraphicsContext enabled,  
>> or is
>> this class only available for wxMSW? Or is something else amiss...
>
> The wxGraphicsContext needs the Cairo library and a new enough  
> version of GTK+ to be able to be compiled, so it is likely that my  
> fc4 build machine either doesn't have a new enough Cairo, or the  
> headers are not installed.  So when the build was done configure  
> detected that it couldn't build that code and disabled it.  I'll  
> check my machine for the next build, but you can probably get  
> something usable if you build the source RPM yourself.  Just watch  
> the output of the configure step as it builds to see if it is  
> finding and enabling use of the Cairo lib.

Since I recently tried getting this going on FC4 myself, I should  
chime in on this. There are two issues here:

1) Cairo is not included by default in FC4

2) Even if you install/build it, FC4 does not use gtk-2.8, meaning it  
does not have the gdk_cairo_create function, which is used by wx  
code. So wx won't build once you have Cairo installed unless you  
disable wxGraphicsContext.

I kinda gave up there, although I probably could have upgraded my  
gtk2 to 2.8 and tried again. I'm just not a guru of Linux upgrade-fu,  
and that package isn't in the FC4 repos anywhere.

Regards,

Kevin

> -- 
> Robin Dunn
> Software Craftsman
> http://wxPython.org  Java give you jitters?  Relax with wxPython!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users- 
> help at lists.wxwidgets.org
>





More information about the wxpython-users mailing list