diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-07-09 04:05:15 -0300 |
---|---|---|
committer | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-07-09 04:05:15 -0300 |
commit | b3f6ec558ca35a19bd60440f2a114eb98c0a4263 (patch) | |
tree | f59df1ac2080b60567ba7893ae4bee677588ab26 /gerber/render/cairo_backend.py | |
parent | 5aaf18889c3cdc31ae61b9593bf5848bc57ec09a (diff) | |
download | gerbonara-b3f6ec558ca35a19bd60440f2a114eb98c0a4263.tar.gz gerbonara-b3f6ec558ca35a19bd60440f2a114eb98c0a4263.tar.bz2 gerbonara-b3f6ec558ca35a19bd60440f2a114eb98c0a4263.zip |
Fix arcs and ackground painting
Diffstat (limited to 'gerber/render/cairo_backend.py')
-rw-r--r-- | gerber/render/cairo_backend.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gerber/render/cairo_backend.py b/gerber/render/cairo_backend.py index 939863b..16638f5 100644 --- a/gerber/render/cairo_backend.py +++ b/gerber/render/cairo_backend.py @@ -72,7 +72,7 @@ class GerberCairoContext(GerberContext): center = map(mul, arc.center, self.scale)
start = map(mul, arc.start, self.scale)
end = map(mul, arc.end, self.scale)
- radius = self.scale * arc.radius
+ radius = self.scale[0] * arc.radius
angle1 = arc.start_angle
angle2 = arc.end_angle
width = arc.aperture.diameter if arc.aperture.diameter != 0 else 0.001
@@ -139,6 +139,10 @@ class GerberCairoContext(GerberContext): self.ctx.paint()
self.ctx.set_operator(cairo.OPERATOR_CLEAR)
+ def _paint_background(self):
+ self.ctx.set_source_rgba(*self.background_color)
+ self.ctx.paint()
+
def dump(self, filename):
is_svg = filename.lower().endswith(".svg")
|