Rotation

ShapeBase.Rotation property

Defines the angle (in degrees) that a shape is rotated. Positive value corresponds to clockwise rotation angle.

public double Rotation { get; set; }

Remarks

The default value is 0.

Examples

Shows how to insert and rotate an image.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert a shape with an image.
Shape shape = builder.InsertImage(ImageDir + "Logo.jpg");
Assert.True(shape.CanHaveImage);
Assert.True(shape.HasImage);

// Rotate the image 45 degrees clockwise.
shape.Rotation = 45;

doc.Save(ArtifactsDir + "Shape.Rotate.docx");

See Also