From 62ef8a1483c9fd3cbd11988db1bb3bf17d98d68b Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 14 Jun 2021 00:28:03 +0200 Subject: Fix remaining cairo backend tests * fix cairo backend handling of arcs in regions --- gerbonara/gerber/render/cairo_backend.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gerbonara/gerber/render') 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) -- cgit