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
| property | explanation | type | default value |
|---|---|---|---|
id ![]() | the unique id of the segment | String | |
type ![]() | the type of the segment | String | “segment” |
vertex1 ![]() | the first vertex this segment goes through | Vertex | |
vertex2 ![]() | the second vertex this segment goes through | Vertex | |
x ![]() | the x coordinate of the midpoint of the segment | Number | |
y ![]() | the y coordinate of the midpoint of the segment | Number |
