summaryrefslogtreecommitdiff
path: root/gerber/render/cairo_backend.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2017-07-04 01:22:47 -0400
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2017-07-04 01:22:47 -0400
commite754f5946885a5c5a9cfa49202ccef4c447d8116 (patch)
treed7d315ddd776e445d070c67ef1f07f6751409705 /gerber/render/cairo_backend.py
parent8def119980342a7ab977267600cee90d3cfcc412 (diff)
downloadgerbonara-e754f5946885a5c5a9cfa49202ccef4c447d8116.tar.gz
gerbonara-e754f5946885a5c5a9cfa49202ccef4c447d8116.tar.bz2
gerbonara-e754f5946885a5c5a9cfa49202ccef4c447d8116.zip
Remove rest of mixed unpack/kwarg syntax to fix #72
Diffstat (limited to 'gerber/render/cairo_backend.py')
-rw-r--r--gerber/render/cairo_backend.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/gerber/render/cairo_backend.py b/gerber/render/cairo_backend.py
index 0a5e550..2e9b143 100644
--- a/gerber/render/cairo_backend.py
+++ b/gerber/render/cairo_backend.py
@@ -252,10 +252,10 @@ class GerberCairoContext(GerberContext):
mask.ctx.set_line_cap(cairo.LINE_CAP_ROUND if isinstance(arc.aperture, Circle) else cairo.LINE_CAP_SQUARE)
mask.ctx.move_to(*start) # You actually have to do this...
if arc.direction == 'counterclockwise':
- mask.ctx.arc(*center, radius=radius, angle1=angle1, angle2=angle2)
+ mask.ctx.arc(center[0], center[1], radius, angle1, angle2)
else:
- mask.ctx.arc_negative(*center, radius=radius,
- angle1=angle1, angle2=angle2)
+ mask.ctx.arc_negative(center[0], center[1], radius,
+ angle1, angle2)
mask.ctx.move_to(*end) # ...lame
mask.ctx.stroke()
@@ -291,11 +291,11 @@ class GerberCairoContext(GerberContext):
angle1 = prim.start_angle
angle2 = prim.end_angle
if prim.direction == 'counterclockwise':
- mask.ctx.arc(*center, radius=radius,
- angle1=angle1, angle2=angle2)
+ mask.ctx.arc(center[0], center[1], radius,
+ angle1, angle2)
else:
- mask.ctx.arc_negative(*center, radius=radius,
- angle1=angle1, angle2=angle2)
+ mask.ctx.arc_negative(center[0], center[1], radius,
+ angle1, angle2)
mask.ctx.fill()
self.ctx.mask_surface(mask.surface, self.origin_in_pixels[0])
@@ -360,7 +360,7 @@ class GerberCairoContext(GerberContext):
with self._clip_primitive(rectangle):
with self._new_mask() as mask:
mask.ctx.set_line_width(0)
- mask.ctx.rectangle(*lower_left, width=width, height=height)
+ mask.ctx.rectangle(lower_left[0], lower_left[1], width, height)
mask.ctx.fill()
center = self.scale_point(rectangle.position)
@@ -418,7 +418,7 @@ class GerberCairoContext(GerberContext):
width, height = tuple([abs(coord) for coord in
self.scale_point((rectangle.width,
rectangle.height))])
- mask.ctx.rectangle(*lower_left, width=width, height=height)
+ mask.ctx.rectangle(lower_left[0], lower_left[1], width, height)
mask.ctx.fill()
center = self.scale_point(obround.position)