insertShape method

insertShape(shapeType, width, height)

Inserts inline shape with specified type and size.

insertShape(shapeType: Aspose.Words.Drawing.ShapeType, width: number, height: number)
ParameterTypeDescription
shapeTypeShapeTypeThe shape type to insert into the document.
widthnumberThe width of the shape in points.
heightnumberThe height of the shape in points.

Returns

The shape node that was inserted.

insertShape(shapeType, horzPos, left, vertPos, top, width, height, wrapType)

Inserts free-floating shape with specified position, size and text wrap type.

insertShape(shapeType: Aspose.Words.Drawing.ShapeType, horzPos: Aspose.Words.Drawing.RelativeHorizontalPosition, left: number, vertPos: Aspose.Words.Drawing.RelativeVerticalPosition, top: number, width: number, height: number, wrapType: Aspose.Words.Drawing.WrapType)
ParameterTypeDescription
shapeTypeShapeTypeThe shape type to insert into the document
horzPosRelativeHorizontalPositionSpecifies where the horizontal distance to the shape is measured from.
leftnumberDistance in points from the origin to the left side of the shape.
vertPosRelativeVerticalPositionSpecifies where the vertical distance to the shape is measured from.
topnumberDistance in points from the origin to the top side of the shape.
widthnumberThe width of the shape in points.
heightnumberThe height of the shape in points.
wrapTypeWrapTypeSpecifies how to wrap text around the shape.

Returns

The shape node that was inserted.

See Also