Package: pango

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

Lambda List

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

Arguments

layout -- a pango-layout object
index -- an integer with 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

Return Value

line -- an integer with the resulting line index, (which will between 0 and (pango-layout-line-count layout) - 1, or nil
x-pos -- an integer with the resulting position within line (+pango-scale+ units per device unit), or nil

Details

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

See also

2021-1-18