FingerHoles: use .saved_context()
This commit is contained in:
parent
1801cfd0cc
commit
abed8c06ac
|
@ -674,7 +674,7 @@ class FingerHoles(FingerJointBase):
|
||||||
:param bedBoltSettings: (Default value = None)
|
:param bedBoltSettings: (Default value = None)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.boxes.ctx.save()
|
with self.boxes.saved_context():
|
||||||
self.boxes.moveTo(x, y, angle)
|
self.boxes.moveTo(x, y, angle)
|
||||||
s, f = self.settings.space, self.settings.finger
|
s, f = self.settings.space, self.settings.finger
|
||||||
p = self.settings.play
|
p = self.settings.play
|
||||||
|
@ -694,10 +694,6 @@ class FingerHoles(FingerJointBase):
|
||||||
self.boxes.rectangularHole(pos + 0.5 * f, 0,
|
self.boxes.rectangularHole(pos + 0.5 * f, 0,
|
||||||
f+p, self.settings.width+p)
|
f+p, self.settings.width+p)
|
||||||
|
|
||||||
self.ctx.restore()
|
|
||||||
self.ctx.move_to(0, 0)
|
|
||||||
|
|
||||||
|
|
||||||
class FingerHoleEdge(BaseEdge):
|
class FingerHoleEdge(BaseEdge):
|
||||||
"""Edge with holes for a parallel finger joint"""
|
"""Edge with holes for a parallel finger joint"""
|
||||||
char = 'h'
|
char = 'h'
|
||||||
|
|
Loading…
Reference in New Issue