Layout.indexToLineX

void indexToLineX(int index, bool trailing, out int line, out int xPos)

Converts from byte index_ within the layout to line and X position.

The X position is measured from the left edge of the line.

Parameters

indexthe byte index of a grapheme within the layout
trailingan integer indicating the edge of the grapheme to retrieve the position of. If > 0, the trailing edge of the grapheme, if 0, the leading of the grapheme
linelocation to store resulting line index. (which will between 0 and pango_layout_get_line_count(layout) - 1)
xPoslocation to store resulting position within line ([pango.types.SCALE] units per device unit)