Skip to main content

ScaleWidth

Scales the width of the figure using the specified coefficient.

Inherited from ApiDrawing.ScaleWidth.

Example

Scales the width of the figure using the specified coefficient in a document.

// How to increase the width of the drawing in a document.

// Scale width for a drawing object in a document.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
for (let i = 1; i < 4; i++ ){
let fill = Api.CreateSolidFill(Api.RGB(255, 111, 61));
let stroke = Api.CreateStroke(0, Api.CreateNoFill());
let drawing = Api.CreateShape("cube", 963295, 963295, fill, stroke);
paragraph.AddDrawing(drawing);
drawing.ScaleWidth( i );
}