summaryrefslogtreecommitdiff
path: root/gerber/render
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-01-31 15:24:57 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-01-31 15:24:57 +0800
commit96bdd0f59dbda9b755b0eb28eb44cb9a6eae1410 (patch)
treeacf632e4dc51c3a5a545defd87f433e0bf8354c3 /gerber/render
parente84f131720e5952ba0dc20de8729bfd1d7aa0fe7 (diff)
downloadgerbonara-96bdd0f59dbda9b755b0eb28eb44cb9a6eae1410.tar.gz
gerbonara-96bdd0f59dbda9b755b0eb28eb44cb9a6eae1410.tar.bz2
gerbonara-96bdd0f59dbda9b755b0eb28eb44cb9a6eae1410.zip
Keep track of quadrant mode so we can draw full circles
Diffstat (limited to 'gerber/render')
-rw-r--r--gerber/render/cairo_backend.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gerber/render/cairo_backend.py b/gerber/render/cairo_backend.py
index fbc4271..7be7e6a 100644
--- a/gerber/render/cairo_backend.py
+++ b/gerber/render/cairo_backend.py
@@ -76,6 +76,9 @@ class GerberCairoContext(GerberContext):
radius = self.scale[0] * arc.radius
angle1 = arc.start_angle
angle2 = arc.end_angle
+ if angle1 == angle2 and arc.quadrant_mode != 'single-quadrant':
+ # Make the angles slightly different otherwise Cario will draw nothing
+ angle2 -= 0.000000001
if isinstance(arc.aperture, Circle):
width = arc.aperture.diameter if arc.aperture.diameter != 0 else 0.001
else: