block#

Functions#

draw()#

draw(manifest, placement, layers, metrics, reading?): Drawing

Defined in: layout/src/block.ts:78

Draw one manifest as one block (section 8): its title, its groups as frames and its ungrouped roots as cards, each item at its place (section 8.6). The items are placed and their member drawings laid out; the block’s one horizontal layout is found over every member drawing; each item is laid out by it; where ancestor cards are drawn behind frames, their roots are laid out alone on their elided axes, reading the frames so laid out, and the member cards below them laid out again with their ancestor rows at the heights of those layouts (section 8.3); the displayed ancestor cards are laid out behind their frames (section 8.8), and every item after a frame whose cards reach beyond it placed again below them; the block is grown around them all; the lines its groupstamps draw across the members of their groups’ frames, then the alignment anchors of its named MatchStamps are drawn last, over everything (section 8.7).

An arranged block (sections 8.6 and 8.8) takes its items in the arrangement’s item order, each at its default place; side by side, in the row core’s rowOf gives, every root that groups hang on drawn once behind it; where rowOf refuses the row, one under another in the item order. The drawing states the arrangement.

manifest is in canonical order, as every manifest core reads or settles is: the drawing follows the order of its arrays and never copies it. Its timelines’ ancestry and its containers are read from core’s index of the manifest, memoised by identity, so drawing one manifest again reuses them.

reading is the reading in force of flow control (section 1); null, the default, reads what no actor believes false. A flow-control element it does not read is faded, starts no section and is no place a destination lands on (sections 3.1, 6.4).

Parameters#

manifest#

Manifest

placement#

Placement

layers#

readonly (Graphical | undefined)[]

metrics#

FontMetrics

reading?#

FlowReading | null = null

Returns#

Drawing