use ItemFactory inserters

This commit is contained in:
Martin Baeuml
2011-05-05 17:47:35 +02:00
parent 5c5526d34b
commit df48841b8a
2 changed files with 8 additions and 24 deletions
+5 -3
View File
@@ -356,9 +356,11 @@ class AnnotationGraphicsItemFactory:
# register common item types
ItemFactory = AnnotationGraphicsItemFactory()
ItemFactory.register('rect', AnnotationGraphicsRectItem, RectItemInserter)
ItemFactory.register('point', AnnotationGraphicsPointItem, PointItemInserter)
ItemFactory.register('polygon', AnnotationGraphicsRectItem, PolygonItemInserter)
ItemFactory.register('rect', AnnotationGraphicsRectItem, RectItemInserter)
ItemFactory.register('ratiorect', None, FixedRatioRectItemInserter)
ItemFactory.register('point', AnnotationGraphicsPointItem, PointItemInserter)
ItemFactory.register('polygon', AnnotationGraphicsRectItem, PolygonItemInserter)
ItemFactory.register('poly', AnnotationGraphicsRectItem, PolygonItemInserter)
### testing
import pytest