aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2023-09-26 12:27:44 +0200
committerThéo de la Hogue2023-09-26 12:27:44 +0200
commit5b27713d162e76a205ee46cff25e5d8fe993a15a (patch)
tree774082c40de9b91174143af8e0694c5f0346006f /src
parent128ca5fb2d5124784e217f3137bcde8eb0e7446c (diff)
downloadargaze-5b27713d162e76a205ee46cff25e5d8fe993a15a.zip
argaze-5b27713d162e76a205ee46cff25e5d8fe993a15a.tar.gz
argaze-5b27713d162e76a205ee46cff25e5d8fe993a15a.tar.bz2
argaze-5b27713d162e76a205ee46cff25e5d8fe993a15a.tar.xz
Fixing SVG loading.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/AreaOfInterest/AOI2DScene.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/argaze/AreaOfInterest/AOI2DScene.py b/src/argaze/AreaOfInterest/AOI2DScene.py
index a726b23..f8599c5 100644
--- a/src/argaze/AreaOfInterest/AOI2DScene.py
+++ b/src/argaze/AreaOfInterest/AOI2DScene.py
@@ -67,11 +67,12 @@ class AOI2DScene(AOIFeatures.AOIScene):
# Convert rect element into dict
rect_dict = {
- 'shape': 'rectangle',
- 'x': float(rect.getAttribute('x')),
- 'y': float(rect.getAttribute('y')),
- 'width': float(rect.getAttribute('width')),
- 'height': float(rect.getAttribute('height'))
+ "Rectangle": {
+ 'x': float(rect.getAttribute('x')),
+ 'y': float(rect.getAttribute('y')),
+ 'width': float(rect.getAttribute('width')),
+ 'height': float(rect.getAttribute('height'))
+ }
}
new_areas[rect.getAttribute('id')] = AOIFeatures.AreaOfInterest.from_dict(rect_dict)
@@ -81,10 +82,11 @@ class AOI2DScene(AOIFeatures.AOIScene):
# Convert circle element into dict
circle_dict = {
- 'shape': 'circle',
- 'cx': float(circle.getAttribute('cx')),
- 'cy': float(circle.getAttribute('cy')),
- 'radius': float(circle.getAttribute('r'))
+ "Circle": {
+ 'cx': float(circle.getAttribute('cx')),
+ 'cy': float(circle.getAttribute('cy')),
+ 'radius': float(circle.getAttribute('r'))
+ }
}
new_areas[circle.getAttribute('id')] = AOIFeatures.AreaOfInterest.from_dict(circle_dict)