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 | ||
|---|---|---|
method | getAngle() | |
method | setAngle(value) | |
| Represents the shape's current angle of rotation in relation to its parent. | ||
method | getDel() | |
method | 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. | ||
method | getFlipX() | |
method | setFlipX(value) | |
| Indicates whether the shape has been flipped horizontally | ||
method | getFlipY() | |
method | setFlipY(value) | |
| Indicates whether the shape has been flipped vertically. | ||
method | getHeight() | |
method | setHeight(value) | |
| Specifies the height of the shape in drawing units. | ||
method | getLocPinX() | |
method | 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'. | ||
method | getLocPinY() | |
method | 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'. | ||
method | getPinPos() | |
method | setPinPos(value) | |
| Specifies the pin position of the shape The value of the property is PinPosValue integer constant. | ||
method | getPinX() | |
method | setPinX(value) | |
| Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the origin of its parent. | ||
method | getPinY() | |
method | setPinY(value) | |
| Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the origin of its parent. | ||
method | getResizeMode() | |
method | setResizeMode(value) | |
| Specifies the current resize behavior setting for the shape when contained in a group. | ||
method | getWidth() | |
method | setWidth(value) | |
| Contains the width of the associated shape in drawing units. | ||
| Method Summary | ||
|---|---|---|
method | deepClone() | |
Creates deep copy of this instance.
|
||
int getDel() / setDel(value)
int getPinPos() / setPinPos(value)
DoubleValue getPinX() / setPinX(value)
DoubleValue getPinY() / setPinY(value)
DoubleValue getWidth() / setWidth(value)
DoubleValue getHeight() / setHeight(value)
DoubleValue getLocPinX() / setLocPinX(value)
DoubleValue getLocPinY() / setLocPinY(value)
DoubleValue getAngle() / setAngle(value)
BoolValue getFlipX() / setFlipX(value)
BoolValue getFlipY() / setFlipY(value)
ResizeMode getResizeMode() / setResizeMode(value)