I have two-dimensional array with size equal screen resolution int[][] matrix = new int[width][height]
where width
and height
are size of screen. I modify array after some multitouch events on screen, for example increase or decrease value of each item. I need to draw in realtime each item in array to each pixel in canvas. For example if value of item is higher then pixel is darker.
I try to use Android draw using SurfaceView and Thread as base. In thread class in override function run in loop throw every array item I do like this canvas.drawPoint(w, h, paint)
. But it is not quick.
Am i right to do this? What is the best way to do it?