anchors#
Interfaces#
AnchorLine#
Defined in: layout/src/anchors.ts:18
A line from (x1, y1) to (x2, y2), in block-local canvas units.
Properties#
x1#
readonlyx1:number
Defined in: layout/src/anchors.ts:19
x2#
readonlyx2:number
Defined in: layout/src/anchors.ts:21
y1#
readonlyy1:number
Defined in: layout/src/anchors.ts:20
y2#
readonlyy2:number
Defined in: layout/src/anchors.ts:22
Functions#
anchorElements()#
anchorElements(
manifest,axes,cascade,block,measure): (TextElement|AnchorElement)[]
Defined in: layout/src/anchors.ts:87
The elements of the alignment anchors of manifest’s named MatchStamps
(section 8.7), the drawn lines axes in block coordinates and block the
block’s style: first every anchor’s line, MatchStamp by MatchStamp in the
order of matchstamps and each one’s anchors in the order of its
alignment_anchors, then their labels in the same order. A line is drawn
when its anchor’s display lists line, it is displayed and it has a
length; the MatchStamp’s name, a label addressed {id: A, part: ["name"]} and held by the line, when display lists name and it is
displayed, centred on the line’s midpoint with its baseline at ym + (a(s) − d(s)) / 2. An anchor one of whose timestamps has no cross-section
segment draws nothing. Neither takes room.
Parameters#
manifest#
axes#
readonly DrawnAxis[]
cascade#
block#
measure#
Returns#
(TextElement | AnchorElement)[]
anchorLine()#
anchorLine(
first,second):AnchorLine|null
Defined in: layout/src/anchors.ts:53
The line of an alignment anchor whose first timestamp has the
cross-section segments first and its second second (section 8.7), from
a segment of the first to one of the second: of the shortest line between
each pair of one segment of each, the one whose dx × dx + dy × dy is
smallest, of equal ones the first in the order of first, then of
second; null where either has none. A line of no length is returned
too: its midpoint still places the anchor’s label. The one geometry of an
alignment anchor, for a named MatchStamp’s and for any other drawn between
two positions of two drawn lines (crossSectionSegment).
Parameters#
first#
readonly CrossSectionSegment[]
second#
readonly CrossSectionSegment[]
Returns#
AnchorLine | null