Aspose::Cells::Drawing::ShapeCollection::Remove method

ShapeCollection::Remove method

Remove the shape.

void Aspose::Cells::Drawing::ShapeCollection::Remove(const Shape &shape)
ParameterTypeDescription
shapeconst Shape&

Examples

    //add first shape
shapes.AddRectangle(2, 0, 2, 0, 50, 50);
//add second shape
shapes.AddRectangle(6, 0, 2, 0, 30, 30);

//get the shape
Shape s = shapes.Get(u"Rectangle 1");// or shapes[0];
if (!s.IsNull())
{
    //remove
    shapes.Remove(s);
}

See Also