import { type Paragraph } from "https://deno.land/x/canvas@v1.2.2/mod.ts";
See Paragraph.h for more information on this class. This is only available if Paragraph has been compiled in.
Methods
getGlyphPositionAtCoordinate(dx: number, dy: number): PositionWithAffinity
Returns the index of the glyph that corresponds to the provided coordinate, with the top left corner as the origin, and +y direction as down.
getRectsForRange(): FlattenedRectangleArray
start: number,
end: number,
hStyle: RectHeightStyle,
wStyle: RectWidthStyle,
Returns bounding boxes that enclose all text in the range of glpyh indexes [start, end).