drawing#
Interfaces#
RaisedCard#
Defined in: arranger/src/drawing.ts:178
A raised ancestor card and the entries it draws, in drawing order.
Type Parameters#
E#
E
Properties#
box#
readonlybox:DrawnBox
Defined in: arranger/src/drawing.ts:179
entries#
readonlyentries: readonlyE[]
Defined in: arranger/src/drawing.ts:180
Functions#
descriptorsOf()#
descriptorsOf(
drawing): readonlyDescriptor[]
Defined in: arranger/src/drawing.ts:152
The element descriptors of a drawing, memoized by the drawing.
Parameters#
drawing#
Returns#
readonly Descriptor[]
drawingOf()#
drawingOf(
block,graphical,metrics,overrides?,pane?):Drawing
Defined in: arranger/src/drawing.ts:89
The drawing of a block: its manifest drawn at its placement with the
default layer, the workspace’s graphical and the manifest’s own
(manifestLayer: its styles and rules), from lowest to highest, for the
pane pane of the canvas showing it (its view, the placement’s view;
layout’s default view without one) where the manifest draws an ancestor
card, whose automatic proportion alone reads it (and only then is the
pane read, so a reaction drawing any other manifest never follows it), and
with the pane’s reading of flow control for the block (readingOf; none
without one), which fades what it does not read. Blocks are
immutable, so the drawing is memoized per block and redrawn only when the
workspace’s graphical, the metrics, the pane or the reading change.
overrides replace members of the block’s placement (a resize measuring
the content at another length or with no size request). Every drawing is
also kept by its manifest and its placement’s values, the RECENT last
of a manifest: a resize measures one block at many placements on every
pointer move, and the block its preview stores draws one of them again.
Parameters#
block#
graphical#
Graphical
metrics#
FontMetrics
overrides?#
Partial<Block>
pane?#
Returns#
nodePosition()#
nodePosition(
block,drawing):object
Defined in: arranger/src/drawing.ts:167
Where the node of block drawn as drawing lies: a block’s x, y are
the canvas position of its place origin (docs/drawing.md in
TimeToShare, section 8.6), which lies at drawing.origin in the block, so
a block that grows left or up moves nothing it holds.
Parameters#
block#
Pick<Block, "x" | "y" | "scale">
drawing#
Returns#
object
x#
x:
number
y#
y:
number
raisedLayers()#
raisedLayers<
E>(entries,drawing,root):object
Defined in: arranger/src/drawing.ts:193
The entries of a block in the layers it shows them in (stackingOf):
below, every entry no raised card draws, in drawing order, then each
displayed ancestor card of the root root (raisedRoot, or the root a
raise is folding back, Unfolding.root) in record order with the
entries it draws (its rectangle and its drawing, the record’s range).
With no root, or a root without a displayed ancestor card, below is
entries itself (the same array) and nothing is raised. The drawing is
never changed: only the order and the layers the block shows it in.
Type Parameters#
E#
E extends object
Parameters#
entries#
readonly E[]
drawing#
root#
string | null
Returns#
object
below#
readonlybelow: readonlyE[]
raised#
readonlyraised: readonlyRaisedCard<E>[]
styleLayers()#
styleLayers(
graphical,manifest): (Graphical|undefined)[]
Defined in: arranger/src/drawing.ts:64
The style layers a block is drawn with: the defaults, the workspace’s rules, then its manifest’s.
Parameters#
graphical#
Graphical
manifest#
Returns#
(Graphical | undefined)[]