Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("EditConnectorGeometry.vsdx"); // set connector shape id connectorId = 4; connector = diagram.getPages().getPage("Page-1").getShapes().getShape(connectorId); // get connector geometry at index 0 defaultLineTo = connector.getGeoms().get(0).getCoordinateCol().getLineToCol().get(0); // remove connector geometry from index 0 connector.getGeoms().get(0).getCoordinateCol().getLineToCol().get(0).setDel(aspose.diagram.BOOL.TRUE); // initialize LineTo geometry object lineTo = new aspose.diagram.LineTo(); // set X value lineTo.getX().setValue(0); // set Y value lineTo.getY().setValue(defaultLineTo.getY().getValue() / 2); // add connector geometry connector.getGeoms().get(0).getCoordinateCol().add(lineTo); // initialize LineTo geometry object lineTo = new aspose.diagram.LineTo(); // set Y value lineTo.getY().setValue(defaultLineTo.getY().getValue() / 2); // set X value lineTo.getX().setValue(defaultLineTo.getX().getValue()); // add connector geometry connector.getGeoms().get(0).getCoordinateCol().add(lineTo); // initialize LineTo geometry object lineTo = new aspose.diagram.LineTo(); // set X value lineTo.getX().setValue(defaultLineTo.getX().getValue()); // set Y value lineTo.getY().setValue(defaultLineTo.getY().getValue()); // add connector geometry connector.getGeoms().get(0).getCoordinateCol().add(lineTo); diagram.save("out-EditConnectorGeometry.vsdx", aspose.diagram.SaveFileFormat.VSDX);
Constructor Summary |
---|
Property Getters/Setters Summary | ||
---|---|---|
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 | getIX() | |
method | setIX(value) | |
The zero-based index of the element within its parent element. | ||
method | getX() | |
method | setX(value) | |
The x-coordinate of the ending vertex of a straight line segment. | ||
method | getY() | |
method | setY(value) | |
The y-coordinate of the ending vertex of a straight line segment. |
Method Summary | ||
---|---|---|
method | deepClone() | |
Creates deep copy of this instance.
|
int getIX() / setIX(value)
int getDel() / setDel(value)
DoubleValue getX() / setX(value)
DoubleValue getY() / setY(value)