Layout.indexToPos

Converts from an index within a pango.layout.Layout to the onscreen position corresponding to the grapheme at that index.

The returns is represented as rectangle. Note that pos->x is always the leading edge of the grapheme and pos->x + pos->width the trailing edge of the grapheme. If the directionality of the grapheme is right-to-left, then pos->width will be negative.

class Layout
void
indexToPos

Parameters

index int

byte index within layout

pos pango.types.Rectangle

rectangle in which to store the position of the grapheme