DiagramResolver class final
Turns a DiagramDocument into a ResolvedScene using a shape registry and a text layout engine.
It keeps resolved shapes, text and connectors between calls to resolve so unchanged elements are reused. It also plans connector reroutes and resolves transient connector previews against an existing scene.
- Available extensions
Constructors
- DiagramResolver({ShapeRegistry? registry, DiagramTextLayoutEngine? textLayout})
-
Resolves against
registry, or the core grammar when omitted.
Properties
-
contentProviders
→ Map<
String, ShapeContentLayoutProvider> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastAdmissionVisits → ({int elements, bool global})
-
Admission element traversals; includes repeated global passes, excluding
paragraph and ancestor traversal within an element.
no setter
- lastResolutionVisits → ({int connectors, int shapes, int texts})
-
Candidate visits for the most recent resolution attempt, including cache
hits. This measures traversal, not elapsed time or backend layout work.
no setter
- registry → ShapeRegistry
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textLayout → DiagramTextLayoutEngine
-
no setter
Methods
-
installDefaultTextLayout(
DiagramTextLayoutEngine backend) → bool - Installs the first platform shaper only when no explicit backend was supplied. The owning diagram must refresh its publication immediately afterwards.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
planConnectorReroute(
ConnectorElement connector, {required ResolvedScene scene}) → List< DiagramPoint> ? - Computes a route plan only when explicitly requested by a command. Null means the bounded search could not find a clear path.
-
planConnectorReroutes(
Iterable< ConnectorElement> connectors, {required ResolvedScene scene}) → Map<String, DiagramConnectorRouteResult> -
Plans explicit reroutes for
connectorsagainst one publishedscene. -
resolve(
DiagramDocument document, {String? defaultFontFamily}) → ResolvedScene -
resolveConnectorPreview(
ConnectorElement connector, {required ResolvedScene scene}) → ResolvedConnector - Resolves transient connection feedback against existing admitted targets. This does not admit or publish content, update caches, or add history. Callers must still submit the completed connection through engine admission.
-
resolveResizeBounds(
{required DiagramRect bounds, required DiagramPoint pointer, required double axisX, required double axisY, required Iterable< FramedElement> members, bool preserveAspectRatio = false, bool fromCenter = false, String? defaultFontFamily}) → DiagramRect -
Available on DiagramResolver, provided by the DiagramResizeResolution extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited