rotation property

ShapeBase.rotation property

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

get rotation(): number

Remarks

The default value is 0.

Examples

Shows how to insert and rotate an image.

let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);

// Insert a shape with an image.
let shape = builder.insertImage(base.imageDir + "Logo.jpg");
expect(shape.canHaveImage).toEqual(true);
expect(shape.hasImage).toEqual(true);

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

doc.save(base.artifactsDir + "Shape.Rotate.docx");

See Also