Package: pango

Function pango:layout-index-to-line-x

Lambda List

pango:layout-index-to-line-x (layout index trailing)

Syntax

(pango:layout-index-to-line-x layout index trailing) => line, xpos

Arguments

layout -- a pango:layout object
index -- an integer for the byte index of a grapheme within the Pango 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
line -- an integer with the resulting line index, which will between 0 and (pango:layout-line-count layout) - 1, or nil
xpos -- an integer with the resulting position within line in Pango units per device unit, or nil

Details

Converts from byte index within the Pango layout to line and xpos position. The xpos position is measured from the left edge of the line.
 

See also

2025-2-15