ShapeBaseDistanceLeft Property

Returns or sets the distance (in points) between the document text and the left edge of the shape.

Namespace:  Aspose.Words.Drawing
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public double DistanceLeft { get; set; }

Property Value

Type: Double
Remarks

The default value is 1/8 inch.

Has effect only for top level shapes.

Examples
Shows how to set the wrapping distance for text that surrounds a shape.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert a rectangle and get the text to wrap tightly around its bounds
Shape shape = builder.InsertShape(ShapeType.Rectangle, 150, 150);
shape.WrapType = WrapType.Tight;

// Set the minimum distance between the shape and surrounding text
shape.DistanceTop = 40.0;
shape.DistanceBottom = 40.0;
shape.DistanceLeft = 40.0;
shape.DistanceRight = 40.0;

// Move the shape closer to the centre of the page
shape.Left = 100.0;
shape.Top = 100.0;

// Rotate the shape
shape.Rotation = 60.0;

// Add text that the shape will push out of the way
for (int i = 0; i < 500; i++)
{
    builder.Write("text ");
}

doc.Save(ArtifactsDir + "Shape.Coordinates.docx");
See Also