canvas - draw line between two cordinates in ondraw() in android -


I have two points, say (x1, y1) and (x2, y2). Now I have to draw a line between these points using the OnDraw () method.

mPaint.setColor (Color.BLACK); Path.moveTo (x1, y1); Path.lineTo (x2, y2); Canvas navepath (route, MP);

text "itemprop =" text ">

try this kind of

  canvas.drawline (p1.x, p1.y, p2.x, p2.y, paint);    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -