Example #1
0
 def draw_ellipse_bezier(self, cp):
     # draw 4 bezier curves to make the ellipse
     path = QPainterPath()
     path.moveTo(cp[0][0], cp[0][1])
     path.cubicTo(cp[1][0], cp[1][1], cp[2][0], cp[2][1], cp[3][0], cp[3][1])
     path.cubicTo(cp[4][0], cp[4][1], cp[5][0], cp[5][1], cp[6][0], cp[6][1])
     path.cubicTo(cp[7][0], cp[7][1], cp[8][0], cp[8][1], cp[9][0], cp[9][1])
     path.cubicTo(cp[10][0], cp[10][1], cp[11][0], cp[11][1], cp[12][0], cp[12][1])
     self.cr.drawPath(path)
Example #2
0
 def draw_ellipse_bezier(self, cp):
     # draw 4 bezier curves to make the ellipse
     path = QPainterPath()
     path.moveTo(cp[0][0], cp[0][1])
     path.cubicTo(cp[1][0], cp[1][1], cp[2][0], cp[2][1], cp[3][0], cp[3][1])
     path.cubicTo(cp[4][0], cp[4][1], cp[5][0], cp[5][1], cp[6][0], cp[6][1])
     path.cubicTo(cp[7][0], cp[7][1], cp[8][0], cp[8][1], cp[9][0], cp[9][1])
     path.cubicTo(cp[10][0], cp[10][1], cp[11][0], cp[11][1], cp[12][0], cp[12][1])
     self.cr.drawPath(path)
Example #3
0
 def draw_bezier_curve(self, cp):
     path = QPainterPath()
     path.moveTo(cp[0][0], cp[0][1])
     path.cubicTo(cp[1][0], cp[1][1], cp[2][0], cp[2][1], cp[3][0], cp[3][1])
     self.cr.drawPath(path)
Example #4
0
 def draw_bezier_curve(self, cp):
     path = QPainterPath()
     path.moveTo(cp[0][0], cp[0][1])
     path.cubicTo(cp[1][0], cp[1][1], cp[2][0], cp[2][1], cp[3][0], cp[3][1])
     self.cr.drawPath(path)