Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("AddingNewShape.vsdx"); // get page by name page = diagram.getPages().getPage("Page-1"); // get shape by id shape = page.getShapes().getShape(796); // alter the size of Shape shape.setWidth(2 * shape.getXForm().getWidth().getValue()); shape.setHeight(2 * shape.getXForm().getHeight().getValue()); diagram.save("out-ChangeShapeSize.vsdx", aspose.diagram.SaveFileFormat.VSDX);
Property Getters/Setters Summary | ||
---|---|---|
function | getAngle() | |
function | setAngle(value) | |
Represents the shape's current angle of rotation in relation to its parent. | ||
function | getDel() | |
function | setDel(value) | |
A flag indicating whether the element has been deleted locally. A value of 1 indicates that the element was deleted locally. The value of the property is BOOL integer constant. | ||
function | getFlipX() | |
function | setFlipX(value) | |
Indicates whether the shape has been flipped horizontally | ||
function | getFlipY() | |
function | setFlipY(value) | |
Indicates whether the shape has been flipped vertically. | ||
function | getHeight() | |
function | setHeight(value) | |
Specifies the height of the shape in drawing units. | ||
function | getLocPinX() | |
function | setLocPinX(value) | |
Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the origin of the shape. The default formula for determining LocPinX is: F='Width* 0.5'. | ||
function | getLocPinY() | |
function | setLocPinY(value) | |
Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the origin of the shape. The default formula for determining LocPinY is: F='Height * 0.5'. | ||
function | getPinPos() | |
function | setPinPos(value) | |
Specifies the pin postion of the shape The value of the property is PinPosValue integer constant. | ||
function | getPinX() | |
function | setPinX(value) | |
Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the origin of its parent. | ||
function | getPinY() | |
function | setPinY(value) | |
Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the origin of its parent. | ||
function | getResizeMode() | |
function | setResizeMode(value) | |
Specifies the current resize behavior setting for the shape when contained in a group. | ||
function | getWidth() | |
function | setWidth(value) | |
Contains the width of the associated shape in drawing units. |
Method Summary | ||
---|---|---|
function | deepClone() | |
Creates deep copy of this instance. |
Property Getters/Setters Detail |
---|
getDel/setDel : Number | |
function getDel() / function setDel(value) |
getPinPos/setPinPos : Number | |
function getPinPos() / function setPinPos(value) |
getPinX/setPinX : DoubleValue | |
function getPinX() / function setPinX(value) |
getPinY/setPinY : DoubleValue | |
function getPinY() / function setPinY(value) |
getWidth/setWidth : DoubleValue | |
function getWidth() / function setWidth(value) |
getHeight/setHeight : DoubleValue | |
function getHeight() / function setHeight(value) |
getLocPinX/setLocPinX : DoubleValue | |
function getLocPinX() / function setLocPinX(value) |
getLocPinY/setLocPinY : DoubleValue | |
function getLocPinY() / function setLocPinY(value) |
getAngle/setAngle : DoubleValue | |
function getAngle() / function setAngle(value) |
getFlipX/setFlipX : BoolValue | |
function getFlipX() / function setFlipX(value) |
getFlipY/setFlipY : BoolValue | |
function getFlipY() / function setFlipY(value) |
getResizeMode/setResizeMode : ResizeMode | |
function getResizeMode() / function setResizeMode(value) |
Method Detail |
---|
deepClone | |
function deepClone() |