coordsAtPos

abstract fun coordsAtPos(pos: Int, side: Int = 1): Rect?

Get the document coordinates of a position. Returns null when outside the viewport.