[gt-users] Using the AnnotationSketch module: output formats and default styles
James Casbon
casbon at gmail.com
Thu Apr 23 15:38:42 CEST 2009
Hi,
I have a couple of problems using AnnotationSketch, which I'm sure are
easily solved.
Firstly, how can you get a canvas object to output to a given format?
For example, your example testdata/gtpython/sketch_simple.py will
output PNG and testdata/gtpython/graphics_stuff.py will output SVG.
But sketch_simple never creates the graphics object so you can't seem
to tell it to use SVG as in the graphics_stuff example.
Secondly, shouldn't style return default values when no value is
present. At the moment, you continually need to say:
bar_height = style.get_num('my element', 'bar_height') or
style.get_num('format', 'bar_height')
(I'm guessing here format returns the default by looking at the examples)
Thanks,
James
More information about the gt-users
mailing list