PDFViewer ... to cairo or not

The code for PDFViewer says it will use cairo if installed. On Windows installing cairo appears to involve quite a bit of yak shaving. What do I gain/lose with the presence/absence of cairo?

Or, alternatively, is there some way to get cairo and py2cairo installed without taxing my brain :slight_smile:

Thanks,
Michael

You can choose to install or not to install Cairo when you are
installing wxPython. Which removes the yak shaving. :wink:

The Cairo and dependent DLLs are now included with wxPython starting in 2.9.2.4. This is because you are now able to have wx.GraphicsContext use the Cairo backend instead of GDI+ if you desire. If you're still using another wxPython release then you can go to http://www.gtk.org/download/win32.php and download the "run-time" version of everything in the "Required third party dependencies" group. Copy the DLLs from each to a folder on your PATH.

There doesn't seem to be current Windows binaries of py2cairo available anywhere so I've built a set for py2.6 and py2.7 that you can download from Index of /cairo

···

On 9/21/11 9:24 AM, Michael Hipp wrote:

The code for PDFViewer says it will use cairo if installed. On Windows
installing cairo appears to involve quite a bit of yak shaving. What do
I gain/lose with the presence/absence of cairo?

Or, alternatively, is there some way to get cairo and py2cairo installed
without taxing my brain :slight_smile:

--
Robin Dunn
Software Craftsman

Thank you!

Michael

···

On 9/21/2011 1:27 PM, Robin Dunn wrote:

The Cairo and dependent DLLs are now included with wxPython starting in 2.9.2.4. This is because you are now able to have wx.GraphicsContext use the Cairo backend instead of GDI+ if you desire. If you're still using another wxPython release then you can go to http://www.gtk.org/download/win32.php and download the "run-time" version of everything in the "Required third party dependencies" group. Copy the DLLs from each to a folder on your PATH.

There doesn't seem to be current Windows binaries of py2cairo available anywhere so I've built a set for py2.6 and py2.7 that you can download from Index of /cairo

I forgot to check this earlier, but you'll want to download and use the new wxcairo.py if you use the new 1.10.0 version of py2cairo. There is a C-API structure that pycairo exports and wxcairo uses ctypes to call some of the functions in the structure, but they keep adding stuff to the middle of the structure instead of always appending the new stuff at the end, so I need to keep adapting to the new shape otherwise we'll end up calling functions through invalid pointers and that will possibly cause the space-time continuum to implode. Or at least cause the program to crash.

http://trac.wxwidgets.org/browser/wxPython/trunk/wx/lib/wxcairo.py

···

On 9/21/11 5:12 PM, Michael Hipp wrote:

On 9/21/2011 1:27 PM, Robin Dunn wrote:

The Cairo and dependent DLLs are now included with wxPython starting
in 2.9.2.4. This is because you are now able to have
wx.GraphicsContext use the Cairo backend instead of GDI+ if you
desire. If you're still using another wxPython release then you can go
to http://www.gtk.org/download/win32.php and download the "run-time"
version of everything in the "Required third party dependencies"
group. Copy the DLLs from each to a folder on your PATH.

There doesn't seem to be current Windows binaries of py2cairo
available anywhere so I've built a set for py2.6 and py2.7 that you
can download from Index of /cairo

Thank you!

--
Robin Dunn
Software Craftsman