···
commandStr = commandStr + ','.join(map(str, args))
self.args['d'] += commandStr
552
-
def M(self, x, y): self.append('M', x, -y)
553
-
def m(self, dx, dy): self.append('m', dx, -dy)
554
-
def L(self, x, y): self.append('L', x, -y)
555
-
def l(self, dx, dy): self.append('l', dx, -dy)
556
-
def H(self, x): self.append('H', x)
557
-
def h(self, dx): self.append('h', dx)
558
-
def V(self, y): self.append('V', -y)
559
-
def v(self, dy): self.append('v', -dy)
560
-
def Z(self): self.append('Z')
553
+
def M(self, x, y): return self.append('M', x, -y)
554
+
def m(self, dx, dy): return self.append('m', dx, -dy)
555
+
def L(self, x, y): return self.append('L', x, -y)
556
+
def l(self, dx, dy): return self.append('l', dx, -dy)
557
+
def H(self, x): return self.append('H', x)
558
+
def h(self, dx): return self.append('h', dx)
559
+
def V(self, y): return self.append('V', -y)
560
+
def v(self, dy): return self.append('v', -dy)
561
+
def Z(self): return self.append('Z')
def C(self, cx1, cy1, cx2, cy2, ex, ey):
562
-
self.append('C', cx1, -cy1, cx2, -cy2, ex, -ey)
563
+
return self.append('C', cx1, -cy1, cx2, -cy2, ex, -ey)
def c(self, cx1, cy1, cx2, cy2, ex, ey):
564
-
self.append('c', cx1, -cy1, cx2, -cy2, ex, -ey)
565
-
def S(self, cx2, cy2, ex, ey): self.append('S', cx2, -cy2, ex, -ey)
566
-
def s(self, cx2, cy2, ex, ey): self.append('s', cx2, -cy2, ex, -ey)
567
-
def Q(self, cx, cy, ex, ey): self.append('Q', cx, -cy, ex, -ey)
568
-
def q(self, cx, cy, ex, ey): self.append('q', cx, -cy, ex, -ey)
569
-
def T(self, ex, ey): self.append('T', ex, -ey)
570
-
def t(self, ex, ey): self.append('t', ex, -ey)
565
+
return self.append('c', cx1, -cy1, cx2, -cy2, ex, -ey)
566
+
def S(self, cx2, cy2, ex, ey): return self.append('S', cx2, -cy2, ex, -ey)
567
+
def s(self, cx2, cy2, ex, ey): return self.append('s', cx2, -cy2, ex, -ey)
568
+
def Q(self, cx, cy, ex, ey): return self.append('Q', cx, -cy, ex, -ey)
569
+
def q(self, cx, cy, ex, ey): return self.append('q', cx, -cy, ex, -ey)
570
+
def T(self, ex, ey): return self.append('T', ex, -ey)
571
+
def t(self, ex, ey): return self.append('t', ex, -ey)
def A(self, rx, ry, rot, largeArc, sweep, ex, ey):
572
-
self.append('A', rx, ry, rot, int(bool(largeArc)), int(bool(sweep)), ex,
573
+
return self.append('A', rx, ry, rot, int(bool(largeArc)),
574
+
int(bool(sweep)), ex, -ey)
def a(self, rx, ry, rot, largeArc, sweep, ex, ey):
575
-
self.append('a', rx, ry, rot, int(bool(largeArc)), int(bool(sweep)), ex,
576
+
return self.append('a', rx, ry, rot, int(bool(largeArc)),
577
+
int(bool(sweep)), ex, -ey)
def arc(self, cx, cy, r, startDeg, endDeg, cw=False, includeM=True,
''' Uses A() to draw a circular arc '''
···
588
-
self.A(r, r, 0, largeArc ^ cw, cw, cx+ex, cy+ey)
589
+
return self.A(r, r, 0, largeArc ^ cw, cw, cx+ex, cy+ey)
''' A sequence of connected lines (or a polygon)