E
E
Eugene2017-05-02 14:59:01
Java
Eugene, 2017-05-02 14:59:01

How to find character position on canvas in android?

There is a canvas with multiline text. How, when you click on the screen, determine the square in which the character that was clicked will be inscribed? Or multiple squares if the press captures multiple characters.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Vasilyev, 2017-05-02
@mickvav

To make it fast, when displaying text in the canvas, you will have to remember somewhere else the bounding-boxes for your characters, and then look not for the canvas, but for the data structure with the bounding boxes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question