Skip to main content

Module geometry

Module geometry 

Source
Expand description

The MEASURE contract a painter (built in or a host’s override) must keep for a control (VAPP-92; mirrors src/geometry.ts): its box comes from the theme’s tokens through the recipe of the part that IS the control, never from the painter. control-geometry.json records every built-in theme × control × size; check_geometry is what the conformance suite runs an override through.

Structs§

GeometryCase
One fixture case an override is run through.
GeometryFailure
GeometryIssue
MeasuredBox
What a painter reports after measuring the control it drew.

Constants§

CONTROL_PARTS
The part whose recipe sizes each control.
DEFAULT_TOLERANCE
The tolerance the TS defaults to.
GEOMETRY_KEYS

Traits§

PainterOverride
A host’s replacement painter for one native kind: it may draw anything, but measure must return the theme’s box.

Functions§

check_geometry
Every geometry key the theme fixes that the measured box misses or changes (a key the theme leaves open is the painter’s).
control_geometry
The numeric box of a control for a theme (mode-independent), in GEOMETRY_KEYS order, numeric values only.
control_part
The sizing part of a control (root for anything not listed).
verify_painter_geometry
Run an override through every case the fixture holds for its kind; only the failing cases come back (named k=v,… or default).