Package-level declarations

The composite leaves — SegmentNode, PolylineNode, PolygonNode — under the sealed CompositeNode family marker: a when over it is exhaustive without an else, so a new composite leaf is a compile error at every dispatch site. The CGA coerce pair applies to PolygonNode directly — generic over the receiver, it returns the leaf through its copy override, style and tags untouched.

Types

Link copied to clipboard
sealed interface CompositeNode : ShapeNode

Marker for a leaf decorating a shape built from primitives.

Link copied to clipboard
open class PolygonNode(polygon: Polygon, var style: ShapeStyle = ShapeStyle.POLYGON, var tags: Set<String> = emptySet()) : Polygon, CompositeNode

A scene-graph leaf that is a Polygon: the loop's geometry carrying the concrete style it renders with, plus optional tags.

Link copied to clipboard
open class PolylineNode(polyline: Polyline, var style: ShapeStyle = ShapeStyle.POLYLINE, var tags: Set<String> = emptySet()) : Polyline, CompositeNode

A scene-graph leaf that is a Polyline: the chain's geometry carrying the concrete style it renders with, plus optional tags.

Link copied to clipboard
open class SegmentNode(segment: Segment, var style: ShapeStyle = ShapeStyle.SEGMENT, var tags: Set<String> = emptySet()) : Segment, CompositeNode

A scene-graph leaf that is a Segment: the segment's geometry carrying the concrete style it renders with, plus optional tags.