Name
playout:IndexToLineX -- index to line x
Synopsis
line, x_pos = playout:IndexToLineX(index, trailing)
Function
Converts from byte index within the layout to line and X position.

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

Inputs
index
the byte index of a grapheme within the layout
trailing
an 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
Results
line
line index (will be between 0 and the number of layout lines minus 1)
x_pos
position within line (#PANGO_SCALE units per device unit)

Show TOC