getCaretPos

open fun getCaretPos(index: <Error class: unknown class>, strongPos: Rectangle?, weakPos: Rectangle?)

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 method@Pango.Layout.get_cursor_pos that applies font metric information about caret slope and offset to the positions it returns.

Caret metrics

Since

1.50

Parameters

index

the byte index of the cursor

strongPos

location to store the strong cursor position

weakPos

location to store the weak cursor position