SkiaTextRenderer icon indicating copy to clipboard operation
SkiaTextRenderer copied to clipboard

GetCursorFromPoint returning 0

Open emmauss opened this issue 4 years ago • 0 comments

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.

emmauss avatar Aug 11 '20 10:08 emmauss