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.


constructor(node: SegmentNode, style: ShapeStyle = node.style, tags: Set<String> = node.tags)

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.

Parameters

node

The leaf to copy.

style

The concrete paint; node's own when omitted.

tags

Free-form tokens riding the leaf; node's own when omitted.