PDFViewer ... to cairo or not

16 views
Skip to first unread message

Michael Hipp

unread,
Sep 21, 2011, 12:24:06 PM9/21/11
to wxpytho...@googlegroups.com
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 :-)

Thanks,
Michael

Boštjan Mejak

unread,
Sep 21, 2011, 1:40:07 PM9/21/11
to wxpytho...@googlegroups.com
You can choose to install or not to install Cairo when you are
installing wxPython. Which removes the yak shaving. ;)

Robin Dunn

unread,
Sep 21, 2011, 2:27:03 PM9/21/11
to wxpytho...@googlegroups.com

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 http://wxpython.org/cairo/


--
Robin Dunn
Software Craftsman
http://wxPython.org

Michael Hipp

unread,
Sep 21, 2011, 8:12:16 PM9/21/11
to wxpytho...@googlegroups.com
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 http://wxpython.org/cairo/
>
Thank you!

Michael

Robin Dunn

unread,
Sep 21, 2011, 8:36:57 PM9/21/11
to wxpytho...@googlegroups.com


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

Reply all
Reply to author
Forward
0 new messages