Esempio n. 1
0
 def quadraticCurveTo(self, cpx, cpy, x, y):
     cp1x = (self.currentX + 2.0 / 3.0 * (cpx - self.currentX))
     cp1y = (self.currentY + 2.0 / 3.0 * (cpy - self.currentY))
     cp2x = (cp1x + (x - self.currentX) / 3.0)
     cp2y = (cp1y + (y - self.currentY) / 3.0)
     self.pathStr.append(PathElement.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y, self))
     self.currentX = x
     self.currentY = y
 def quadraticCurveTo(self, cpx, cpy, x, y):
     cp1x = (self.currentX + 2.0 / 3.0 * (cpx - self.currentX))
     cp1y = (self.currentY + 2.0 / 3.0 * (cpy - self.currentY))
     cp2x = (cp1x + (x - self.currentX) / 3.0)
     cp2y = (cp1y + (y - self.currentY) / 3.0)
     self.pathStr.append(PathElement.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y, self))
     self.currentX = x
     self.currentY = y
Esempio n. 3
0
 def cubicCurveTo(self, cp1x, cp1y, cp2x, cp2y, x, y):
     self.pathStr.append(PathElement.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y, self))
     self.currentX = x
     self.currentY = y
Esempio n. 4
0
 def cubicCurveTo(self, cp1x, cp1y, cp2x, cp2y, x, y):
     self.pathStr.append(
         PathElement.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y, self))
     self.currentX = x
     self.currentY = y