ResolvedScene class final

An immutable snapshot of a document resolved at one revision.

elements are the visible elements in paint order. The scene finds elements by identity, tests points against them and queries them by area through its spatialIndex.

Constructors

ResolvedScene({required String documentId, required int revision, int textLayoutRevision = 0, String? defaultFontFamily, required List<ResolvedElement> elements, ResolvedScene? previous, List<ResolvedElement> hiddenElements = const [], FrameCollapseProjection? collapseProjection})
factory

Properties

bounds → DiagramRect
latefinal
collapseProjection → FrameCollapseProjection?
final
connectedPorts → Map<String, Set<String>>
Port ids bound by a connector endpoint, keyed by element id.
latefinal
defaultFontFamily → String?
Drawing font used to resolve text without an explicit font family.
final
documentId → String
final
elements → List<ResolvedElement>
final
hashCode → int
The hash code for this object.
no setterinherited
hasHiddenElements → bool
no setter
revision → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spatialIndex → DiagramSpatialIndex
final
textLayoutRevision → int
Environmental font/shaping dependency, separate from authored revision.
final

Methods

clippingAncestorsOf(ResolvedElement element) → Iterable<ResolvedShape>
Clipping owners, nearest first, from this resolved world's ownership chain. Invalid chains fail rather than silently rendering outside missing clips.
connectorById(String id) → ResolvedConnector?
elementById(String id) → ResolvedElement?
framedElementById(String id) → ResolvedFramedElement?
hitTest(DiagramPoint point, {double tolerance = 5, bool preferDescendants = true}) → ResolvedElement?
hitTestFramedElement(DiagramPoint point, {bool where(ResolvedFramedElement element)?}) → ResolvedFramedElement?
hitTestPort(DiagramPoint point, {double tolerance = 6}) → ResolvedPortTarget?
hitTestShape(DiagramPoint point, {bool where(ResolvedShape shape)?}) → ResolvedShape?
isPortConnected(String elementId, String portId) → bool
isVisible(String id) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paintIndexOf(String id) → int?
Position of a visible element in elements (paint order), or null. Renderers use it for batch keys that do not shift with viewport culling.
replaceElements(int revision, Iterable<ResolvedElement> replacements, {FrameCollapseProjection? collapseProjection}) → ResolvedScene
Publishes stable-identity replacements without sorting or scanning the scene. The scene owns both paint and source order; callers cannot supply indexes.
shapeById(String id) → ResolvedShape?
snapConnectionPoint(DiagramPoint point, {required double radius, bool portsOnly = false}) → ResolvedConnectionPoint?
Nearest visible magnet within a caller-supplied world-space radius. Convert a screen-pixel configuration by dividing by camera zoom.
textById(String id) → ResolvedTextElement?
toString() → String
A string representation of this object.
inherited
visibleEndpoint(ConnectorEndpoint endpoint) → ConnectorEndpoint

Operators

operator ==(Object other) → bool
The equality operator.
inherited