From a8fff61b83e97952b2f5b657dd561d0b910d5ec2 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sat, 20 Jul 2013 17:51:54 +0200 Subject: [PATCH] rectanglularHole --- boxes.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/boxes.py b/boxes.py index c0d56e9..149cf88 100755 --- a/boxes.py +++ b/boxes.py @@ -639,6 +639,13 @@ class Boxes: self.moveTo(x+r, y) self.ctx.arc(-r, 0, r, 0, 2*math.pi) + @restore + def rectangularHole(self, x, y, dx, dy, r=0): + self.moveTo(x+r-dx/2.0, y-dy/2.0, 180) + for d in (dy, dx, dy, dx): + self.corner(-90, r) + self.edge(d) + # hexHoles def hexHolesRectangle(self, x, y, settings=None, skip=None):