Segment

The Segment class represents a line or a curve that connects two vertices in a path. Segments are automatically created when vertices are added to a path.

Properties

propertyexplanationtypedefault value
id the unique id of the segmentString
type the type of the segmentString“segment”
vertex1 the first vertex this segment goes throughVertex
vertex2 the second vertex this segment goes throughVertex
x the x coordinate of the midpoint of the segmentNumber
y the y coordinate of the midpoint of the segmentNumber