summaryrefslogtreecommitdiff
path: root/gerbonara/cam.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-06-21 14:17:08 +0200
committerjaseg <git@jaseg.de>2022-06-21 14:17:08 +0200
commit7bdbe66dc7caf3d27fd13b72a2603b7bca19762d (patch)
tree2fa0507a61b7acbdfa1fa39f2b70d9788e2d12f9 /gerbonara/cam.py
parent71e996e8749e26dcc1385b03603344dede891782 (diff)
downloadgerbonara-7bdbe66dc7caf3d27fd13b72a2603b7bca19762d.tar.gz
gerbonara-7bdbe66dc7caf3d27fd13b72a2603b7bca19762d.tar.bz2
gerbonara-7bdbe66dc7caf3d27fd13b72a2603b7bca19762d.zip
Fix zip import/export and bounds for empty boardsv0.11.1
Diffstat (limited to 'gerbonara/cam.py')
-rw-r--r--gerbonara/cam.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gerbonara/cam.py b/gerbonara/cam.py
index fb69e5c..8a5ad68 100644
--- a/gerbonara/cam.py
+++ b/gerbonara/cam.py
@@ -267,6 +267,8 @@ class CamFile:
# setup viewport transform flipping y axis
(content_min_x, content_min_y), (content_max_x, content_max_y) = bounds
+ content_min_x, content_min_y = float(content_min_x), float(content_min_y)
+ content_max_x, content_max_y = float(content_max_x), float(content_max_y)
content_w, content_h = content_max_x - content_min_x, content_max_y - content_min_y
xform = f'translate({content_min_x:.6} {content_min_y+content_h:.6}) scale(1 -1) translate({-content_min_x:.6} {-content_min_y:.6})'
tags = [tag('g', tags, transform=xform)]