delete_shape方法

delete_shape(shape)

删除形状。如果形状在组中或者是评论形状,则不会被删除。

def delete_shape(self, shape):
    ...
范围类型描述
shapeShape

例子


# add first shape
firstShape = shapes.add_rectangle(2, 0, 2, 0, 50, 50)
# add second shape
secondShape = shapes.add_rectangle(6, 0, 2, 0, 30, 30)
# del
shapes.delete_shape(firstShape)

也可以看看