Skip to content
pixi-silk
GitHub repository
Interface

LayoutLine

import type { LayoutLine } from 'pixi-silk/text';

One line of a laid-out text.

Properties#

PropertyTypeDescriptionDefined in
bottomnumberBottom of the line box.text/layout.ts:63
caretsnumber[]The x of the caret at each of offsets. Spaces past the line’s edge hang beyond width.text/layout.ts:76
endnumberOffset where the line ends, before its newline. Spaces a wrap removed count as part of the line, so a wrapped line ends where the next one starts.text/layout.ts:70
offsetsnumber[]Every place a caret can sit on the line, as source offsets from start to end.text/layout.ts:74
startnumberOffset in the source text where the line starts.text/layout.ts:65
textstringThe characters on the line, without the spaces a wrap removed.text/layout.ts:53
topnumberTop of the line box. Lines stack every lineHeight.text/layout.ts:61
widthnumberWidth of the line, without trailing spaces that hang past the edge.text/layout.ts:55
wrappedbooleanTrue when the line ends at a wrap rather than at a newline or the end of the text.text/layout.ts:72
xnumberLeft edge of the line after alignment.text/layout.ts:59
ynumberBaseline y.text/layout.ts:57