summaryrefslogtreecommitdiffstats
path: root/libdimension-python/tests/demo.py
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-20 16:34:52 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-20 16:34:52 -0600
commit250b980002419746fc099c7633b9600a15afb1c6 (patch)
treec146041da19654d565a6dc433eebada324fc9fb9 /libdimension-python/tests/demo.py
parentad716acc7fa7fd151ff96fe6d17f0ba1a3a66379 (diff)
downloaddimension-250b980002419746fc099c7633b9600a15afb1c6.tar.xz
Add Canvases to the Python module.
Diffstat (limited to 'libdimension-python/tests/demo.py')
-rwxr-xr-xlibdimension-python/tests/demo.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/libdimension-python/tests/demo.py b/libdimension-python/tests/demo.py
index e9cdc7b..187f4ef 100755
--- a/libdimension-python/tests/demo.py
+++ b/libdimension-python/tests/demo.py
@@ -24,4 +24,15 @@ from dimension import *
# Treat warnings as errors for tests
dieOnWarnings(True)
-scene = Scene()
+canvas = Canvas(width = 768, height = 480)
+
+havePNG = True
+try:
+ canvas.optimizePNG()
+except OSError as e:
+ if e.errno == errno.ENOSYS:
+ havePNG = False
+ else:
+ raise
+
+scene = Scene(canvas = canvas)