Canvas Touch help

I'm trying to make a touch pad for a phone app and I'm using a canvas that is 250 x 250 pixels in size, When I do a WhenDragged I get the pixel location at a single pixel coordinate. I'm trying to see if there is a way to increase the area of touch so that you don't have to touch an exact pixel to activate another function. for example if pixel location 100x150 is the center of touch, if a touch is found at 102x148 it will still call the same function. I'm trying to get about a 10x10 pixel area that can be detected. In my 250 x 250 square I need to have 24 x 24 touch locations.

This picture shows an idea of what I'm looking for.


Take your x or y pixel value.
Divide it by 10, then add 1 to floor of the result.
That should give you an integer between 1 and 25.

This is called snap to grid.


Hello Ryan

Far easier to use an HTML Table where each cell activates a function. However, 24 touch locations across the width of a phone yields a very small area for touch, not at all fat-finger friendly (or even thin finger friendly). Is your App going to force Landscape orientation?