Skip to main content

Module eval

Module eval 

Source
Expand description

Numeric evaluation of entities: world anchors, drawable shapes and texts.

Built-in entities use their canonical geometry; dimensions are computed from the anchors they reference; plugin entities are evaluated from their compiled definition; entities whose plugin is missing, disabled or too old fall back to their stored standard representation and are read-only.

Structs§

Ctx
Evaluation context.
EvalCache
Cache of evaluations keyed by entity.
Evaluated
Result of evaluating one entity.

Enums§

Drawable
A drawable piece.
ReadOnly
Why an entity cannot be edited.

Constants§

MAX_REF_DEPTH
Maximum reference depth while evaluating anchors of referenced entities.

Functions§

evaluate
Evaluate an entity.
fill_template
Fill {prop} placeholders.
format_measure
Format a measured value in the document’s display unit.
format_number
Format a number with at most decimals fraction digits, trimming zeros.
param_value
Numeric parameter of any entity (width, start.x, r, …), in its local units.
plugin_for
Compatibility of an entity with the registered plugin type.