Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::components::FontResourceGraph Class Reference

A frame-local snapshot of the font dependencies and resolved reference ranges of the render tree. More...

#include "donner/svg/components/FontResourceGraph.h"

Classes

struct  Collection
 Owned result of following the prepared references reachable from a target. More...

Public Types

enum class  Purpose {
  CompleteTarget ,
  RenderedFrame
}
 Choose between full prepared dependencies and completed rendered-frame evidence. More...

Public Member Functions

 FontResourceGraph (const Registry &registry)
 Snapshot a prepared tree under the document access guard. Does not load any font.
Collection collect (const Registry &registry, Entity target, Purpose purpose=Purpose::CompleteTarget) const
 Collect main-tree instances beneath target, including <use> shadow children, and follow only their resolved paint/mask/marker ranges. A text span includes its containing text root.
void invalidateDependents (Registry &registry, std::span< const Entity > changedOwners) const
 Mark consumers of changed geometry through the references captured before refresh. Ordinary ancestor-layer propagation remains the renderer's existing dirty-entity path.
void refreshMetadata (const Registry &registry)
 Refresh per-instance font evidence after resources change without rebuilding graph edges.

Detailed Description

A frame-local snapshot of the font dependencies and resolved reference ranges of the render tree.

Component pointers never survive construction. Build before resource refresh removes geometry, then use the same snapshot to invalidate its actual consumers.


Class Documentation

◆ donner::svg::components::FontResourceGraph::Collection

struct donner::svg::components::FontResourceGraph::Collection

Owned result of following the prepared references reachable from a target.

Class Members
vector< FontFaceDependency > dependencies
bool needsRender = false
bool resourceLimit = false
vector< Entity > textRoots Reached geometry owners, for guarded layout preparation.

Member Enumeration Documentation

◆ Purpose

Choose between full prepared dependencies and completed rendered-frame evidence.

Enumerator
CompleteTarget 

Follow the complete prepared target subtree.

RenderedFrame 

Use only evidence from a completed render scope.

Member Function Documentation

◆ refreshMetadata()

void donner::svg::components::FontResourceGraph::refreshMetadata ( const Registry & registry)

Refresh per-instance font evidence after resources change without rebuilding graph edges.

Parameters
registryDocument registry with current font and instance metadata.

The documentation for this class was generated from the following file: