Aspose::Cells::Drawing::ShapeCollection::AddCopy method

ShapeCollection::AddCopy method

Adds and copy a shape to the worksheet.

Shape Aspose::Cells::Drawing::ShapeCollection::AddCopy(const Shape &sourceShape, int32_t topRow, int32_t top, int32_t leftColumn, int32_t left)
ParameterTypeDescription
sourceShapeconst Shape&Source shape.
topRowint32_tThe top row index.
topint32_tRepresents the vertical offset from its top row, in unit of pixel.
leftColumnint32_tThe left column index.
leftint32_tRepresents the horizontal offset from its left column, in unit of pixel.

ReturnValue

The new Shape object.

Examples

    //add a shape
RectangleShape rectangle = shapes.AddRectangle(2, 0, 2, 0, 130, 130);
//Adds and copies a shape.
shapes.AddCopy(rectangle, 7, 0, 7, 0);

See Also