From d830375c4c33e6a863e02c9f767c127841a070f7 Mon Sep 17 00:00:00 2001 From: Hamilton Kibbe Date: Fri, 20 Feb 2015 10:07:26 -0500 Subject: Fix arc width per comment in #12 --- gerber/render/cairo_backend.py | 2 +- gerber/render/svgwrite_backend.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gerber/render') diff --git a/gerber/render/cairo_backend.py b/gerber/render/cairo_backend.py index f79dfbe..326f44e 100644 --- a/gerber/render/cairo_backend.py +++ b/gerber/render/cairo_backend.py @@ -83,7 +83,7 @@ class GerberCairoContext(GerberContext): radius = SCALE * arc.radius angle1 = arc.start_angle angle2 = arc.end_angle - width = arc.width if arc.width != 0 else 0.001 + width = arc.aperture.diameter if arc.aperture.diameter != 0 else 0.001 self.ctx.set_source_rgba(*color, alpha=self.alpha) self.ctx.set_line_width(width * SCALE) self.ctx.set_line_cap(cairo.LINE_CAP_ROUND) diff --git a/gerber/render/svgwrite_backend.py b/gerber/render/svgwrite_backend.py index ae7c377..a88abfe 100644 --- a/gerber/render/svgwrite_backend.py +++ b/gerber/render/svgwrite_backend.py @@ -81,7 +81,7 @@ class GerberSvgContext(GerberContext): start = tuple(map(mul, arc.start, self.scale)) end = tuple(map(mul, arc.end, self.scale)) radius = SCALE * arc.radius - width = arc.width if arc.width != 0 else 0.001 + width = arc.aperture.diameter if arc.aperture.diameter != 0 else 0.001 arc_path = self.dwg.path(d='M %f, %f' % start, stroke=svg_color(color), stroke_width=SCALE * width) -- cgit