summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/render/cairo_backend.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-06-14 00:28:03 +0200
committerjaseg <git@jaseg.de>2021-06-14 00:28:03 +0200
commit62ef8a1483c9fd3cbd11988db1bb3bf17d98d68b (patch)
treec6de87090c8e889938edd0523c042791f4979c52 /gerbonara/gerber/render/cairo_backend.py
parent0b8e99f79a168c1899949b7466755b4f8e06bac3 (diff)
downloadgerbonara-62ef8a1483c9fd3cbd11988db1bb3bf17d98d68b.tar.gz
gerbonara-62ef8a1483c9fd3cbd11988db1bb3bf17d98d68b.tar.bz2
gerbonara-62ef8a1483c9fd3cbd11988db1bb3bf17d98d68b.zip
Fix remaining cairo backend tests
* fix cairo backend handling of arcs in regions
Diffstat (limited to 'gerbonara/gerber/render/cairo_backend.py')
-rw-r--r--gerbonara/gerber/render/cairo_backend.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gerbonara/gerber/render/cairo_backend.py b/gerbonara/gerber/render/cairo_backend.py
index ff5e6cb..a7baf84 100644
--- a/gerbonara/gerber/render/cairo_backend.py
+++ b/gerbonara/gerber/render/cairo_backend.py
@@ -295,6 +295,10 @@ class GerberCairoContext(GerberContext):
radius = self.scale[0] * prim.radius
angle1 = prim.start_angle
angle2 = prim.end_angle
+
+ if angle1 == angle2:
+ # Make the angles slightly different otherwise Cario will draw nothing
+ angle2 -= 0.000000001
if prim.direction == 'counterclockwise':
mask.ctx.arc(center[0], center[1], radius,
angle1, angle2)