rangeRects
import { rangeRects } from 'pixi-silk/text';
function rangeRects(
layout: TextLayout,
from: number,
to: number,
newline?: number
): TextRect[];
Highlight boxes of the range from to to, one per line, the full height of each line box. A range
that runs on past a newline gets a sliver of newline width at that line’s end, so selected empty
lines still show. Default newline width a quarter of the font height.
Parameters#
| Parameter | Type |
|---|---|
layout | TextLayout |
from | number |
to | number |
newline? | number |
Returns#
TextRect[]