aspose.diagram
Class LineTo

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
functiongetDel()
functionsetDel(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.
functiongetIX()
functionsetIX(value)
           The zero-based index of the element within its parent element.
functiongetX()
functionsetX(value)
           The x-coordinate of the ending vertex of a straight line segment.
functiongetY()
functionsetY(value)
           The y-coordinate of the ending vertex of a straight line segment.
 
Method Summary
functiondeepClone()→ inherited from Coordinate
           Creates deep copy of this instance.
 

Constructor Detail

LineTo

function LineTo()
Creates an instance of the LineTo class.

Property Getters/Setters Detail

getIX/setIX : Number 

function getIX() / function setIX(value)
The zero-based index of the element within its parent element.

getDel/setDel : Number 

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.

getX/setX : DoubleValue 

function getX() / function setX(value)
The x-coordinate of the ending vertex of a straight line segment.

getY/setY : DoubleValue 

function getY() / function setY(value)
The y-coordinate of the ending vertex of a straight line segment.

Method Detail

deepClone

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

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.