* Refactor wx.lib.wxcairo to a subpackage.

* Add support for using cairocffi instead of PyCairo.
This commit is contained in:
Robin Dunn
2016-07-19 17:23:37 -07:00
parent d775f28143
commit 7ed47817ba
5 changed files with 282 additions and 103 deletions

View File

@@ -66,7 +66,8 @@ class TestPanel(wx.Panel):
def OnListBoxSelect(self, evt):
snippet_file = opj('snippets/%s.py' % evt.GetString())
text = file(snippet_file).read()
with open(snippet_file) as f:
text = f.read()
self.canvas.SetSnippet(text)
self.editor.SetValue(text)
@@ -99,10 +100,10 @@ overview = """<html><body>
<h2><center>Cairo Integration</center></h2>
The wx.lib.wxcairo module provides a bit of glue that will allow you to
use the Pycairo package drawing directly on wx.DC's.
use the PyCairo or cairocffi packages to do Cairo drawing directly on wx.DC's.
<p> This sample draws the standard 'snippet' examples that come with
the Pycairo pacakge, and a few others. The C version of the samples
the PyCairo package, and a few others. The C version of the samples
can be seen at http://cairographics.org/samples/
<p> In most snippets you'll see a call to a snippet_normalize()