Exemple #1
0
 def createRectangle(p0, p1):
     shape = Shape()
     shape.shape_type = "rectangle"
     shape.addPoint(p0)
     shape.addPoint(p1)
     shape.close()
     return shape
Exemple #2
0
 def createLine(p0, p1, pt_scale, color=(0, 127, 0)):
     shape = Shape()
     shape.shape_type = "line"
     shape.addPoint(p0)
     shape.addPoint(p1)
     shape.setColor(color[0], color[1], color[2])
     shape.scale = pt_scale
     shape.close()
     return shape