def createRectangle(p0, p1): shape = Shape() shape.shape_type = "rectangle" shape.addPoint(p0) shape.addPoint(p1) shape.close() return shape
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