Thursday 25 February 2010

Canvas.drawLine vs Canvas.drawPath

In Android, if you are in a situation in which you are drawing lots of connected lines (like routes on MapView) try to use "canvas.drawPath". In one of my applications I am drawing nearly 500 routes containing 10.000 points and using "canvas.drawPath" instead of "canvas.drawLine" decreases the drawing time as up to %30.