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.


  1. hi,
    please sent the complete source code or sample project to me.

  2. Hi Serkan Dogantekin , Can you please suggest me that how can we drawn lines in different patterns? For example please read my question on stackoverflow:- I am waiting for your positive replay! You can contact me on id:- Thanks in advance! :)