Layout.getCaretPos

void getCaretPos(int index, out pango.types.Rectangle strongPos, out pango.types.Rectangle weakPos)

Given an index within a layout, determines the positions that of the strong and weak cursors if the insertion point is at that index.

This is a variant of [pango.layout.Layout.getCursorPos] that applies font metric information about caret slope and offset to the positions it returns.

Caret metrics

Parameters

indexthe byte index of the cursor
strongPoslocation to store the strong cursor position
weakPoslocation to store the weak cursor position