DeleteShape

ShapeCollection.DeleteShape method

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

public void DeleteShape(Shape shape)
范围类型描述
shapeShape

例子


[C#]
//添加第一个形状
Shape firstShape = shapes.AddRectangle(2, 0, 2, 0, 50, 50);
//添加第二个形状
Shape secondShape = shapes.AddRectangle(6, 0, 2, 0, 30, 30);
//删除
shapes.DeleteShape(firstShape);

也可以看看