asposediagram.api

Contains x- and y-coordinates of the ending vertex of a straight line segment. These coordinates are contained in the X and Y elements, respectively.

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
LineTo()
Creates an instance of the LineTo class.
 
Property Getters/Setters Summary
methodgetDel()
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.
methodgetIX()
method
setIX(value)
           The zero-based index of the element within its parent element.
methodgetX()
method
setX(value)
           The x-coordinate of the ending vertex of a straight line segment.
methodgetY()
method
setY(value)
           The y-coordinate of the ending vertex of a straight line segment.
 
Method Summary
methoddeepClone()
Creates deep copy of this instance.
 

    • Constructor Detail

      • LineTo

        LineTo()
        Creates an instance of the LineTo class.
    • Property Getters/Setters Detail

      • getIX/setIX : int 

        int getIX() / setIX(value)
        
        The zero-based index of the element within its parent element.
      • getDel/setDel : int 

        int getDel() / 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.
      • getX/setX : DoubleValue 

        DoubleValue getX() / setX(value)
        
        The x-coordinate of the ending vertex of a straight line segment.
      • getY/setY : DoubleValue 

        DoubleValue getY() / setY(value)
        
        The y-coordinate of the ending vertex of a straight line segment.
    • Method Detail

      • deepClone

        Object deepClone()
        Creates deep copy of this instance.
        Returns: