SkiaTextRenderer
SkiaTextRenderer copied to clipboard
GetCursorFromPoint returning 0
I'm trying to get the position of the cursor from a location within the bounds of the text rendered. My understanding is that GetCursorFromPoint will get the position at a point on the rendered text. No matter which point I use, it always returns 0. I've verified that the point falls within the text rendered.
I call it with the following line;
int cursorPosition = TextRendererSk.GetCursorFromPoint(_text, Font, _boundingRect.Bounds, TextFormatFlags.VerticalCenter, position, out var cursor);
Font
uses the default typeface and size 14.