diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-05-20 16:34:52 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-05-20 16:34:52 -0600 |
commit | 250b980002419746fc099c7633b9600a15afb1c6 (patch) | |
tree | c146041da19654d565a6dc433eebada324fc9fb9 /libdimension-python/tests/demo.py | |
parent | ad716acc7fa7fd151ff96fe6d17f0ba1a3a66379 (diff) | |
download | dimension-250b980002419746fc099c7633b9600a15afb1c6.tar.xz |
Add Canvases to the Python module.
Diffstat (limited to 'libdimension-python/tests/demo.py')
-rwxr-xr-x | libdimension-python/tests/demo.py | 13 |
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) |