Add turtle param to polygonWall
to allow using it as turtle graphic command instead of a part
This commit is contained in:
parent
dc11929258
commit
0b781ce7ef
|
@ -1864,7 +1864,8 @@ class Boxes:
|
||||||
|
|
||||||
return ext
|
return ext
|
||||||
|
|
||||||
def polygonWall(self, borders, edge="f", callback=None, move=None):
|
def polygonWall(self, borders, edge="f", turtle=False,
|
||||||
|
callback=None, move=None):
|
||||||
|
|
||||||
e = self.edges.get(edge, edge)
|
e = self.edges.get(edge, edge)
|
||||||
t = self.thickness # XXX edge.margin()
|
t = self.thickness # XXX edge.margin()
|
||||||
|
@ -1872,6 +1873,8 @@ class Boxes:
|
||||||
minx, miny, maxx, maxy = self._polygonWallExtend(borders, e)
|
minx, miny, maxx, maxy = self._polygonWallExtend(borders, e)
|
||||||
|
|
||||||
tw, th = maxx - minx, maxy - miny
|
tw, th = maxx - minx, maxy - miny
|
||||||
|
|
||||||
|
if not turtle:
|
||||||
if self.move(tw, th, move, True):
|
if self.move(tw, th, move, True):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1893,6 +1896,7 @@ class Boxes:
|
||||||
self.edge(length_correction)
|
self.edge(length_correction)
|
||||||
self.corner(next_angle, tabs=1)
|
self.corner(next_angle, tabs=1)
|
||||||
|
|
||||||
|
if not turtle:
|
||||||
self.move(tw, th, move)
|
self.move(tw, th, move)
|
||||||
|
|
||||||
@restore
|
@restore
|
||||||
|
|
Loading…
Reference in New Issue