[gt-users] Using the AnnotationSketch module: output formats and default styles
James Casbon
casbon at gmail.com
Thu Apr 23 16:17:42 CEST 2009
2009/4/23 Sascha Steinbiss <steinbiss at zbh.uni-hamburg.de>:
> For an example, see the attached new version of
> gtpython/gt/annotationsketch/canvas.py.
OK, great. I have attached one which reuses the definitions in
graphics.py to avoid magic numbers.
> Any ideas about how to degrade gracefully in user code still instantiating
> CanvasCairoFile classes?
Since you need to create the gtlib canvas before knowing the filename,
you cannot guess. The best I can think is to have a module level
default which clients can tweak if they want. See attached
> style class itself, but in the layout logic. The behaviour of returning None
> if no value is found is intentional because it leaves the decision about how
> to handle this case to the programmer. Of course, you are free to subclass
> the Style class and add a thin layer in your code, implementing the
> behaviour stated above.
Ok, sure, sounds reasonable. Thanks for all the help,
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: canvas.py
Type: application/octet-stream
Size: 3900 bytes
Desc: not available
Url : http://genometools.org/pipermail/gt-users/attachments/20090423/c8ddb7fe/attachment.obj
More information about the gt-users
mailing list