closestToPoint

fun CharSequence.closestToPoint(renderer: Renderer, font: Font, fontSize: Float, x: Float): Int

Returns the closest character index from the given string to the given point x.

Return

the index of the character closest to the given point x, or -1 if it could not be found.

Since

0.18.5