SegmentNode
constructor(segment: Segment, style: ShapeStyle = ShapeStyle.SEGMENT, tags: Set<String> = emptySet())
Builds the leaf around segment's endpoints.
Parameters
segment
The geometry to decorate; its endpoints are kept by reference.
style
The concrete paint; the segment default when omitted.
tags
Free-form tokens riding the leaf; empty by default.
Builds the leaf as a copy of node: the same geometry, and node's own style and tags unless either is overridden.
Construction rebuilds the segment from node's endpoints — the endpoint instances are kept by reference, and rebuilding them reproduces the geometry exactly. Overriding style or tags swaps that part alone — the other still comes from node.