geometry - How can i add values to trianagle drawcanvas in android? -


i have small problem put values in canvas triangle. please find images.

wanted image: https://drive.google.com/file/d/0b0udilp3sesvbeg2cfvraza4ndq/edit?usp=sharing

tried image: https://drive.google.com/file/d/0b0udilp3sesvtvvrutizotnjdtq/edit?usp=sharing

i want put 10 90 values in triangle canvas , names also. please give me suggestions how achieve this. have tried can't solution.

code:

protected void ondraw(canvas canvas) {         super.ondraw(canvas);         paint paint = new paint();          /*paint.setcolor(android.graphics.color.black);         canvas.drawpaint(paint);*/          paint.setstrokewidth(4);         paint.setcolor(android.graphics.color.red);         paint.setstyle(paint.style.fill_and_stroke);         paint.setantialias(true);          point = new point(350,300);         point b = new point(50,700);         point c = new point(700,700);          path path = new path();         path.setfilltype(filltype.even_odd);          path.moveto(350,300);         path.lineto(b.x, b.y);         path.lineto(c.x, c.y);         path.lineto(a.x, a.y);         path.close();          canvas.drawpath(path, paint);            paint paint1 = new paint();          //paint1.setcolor(android.graphics.color.black);         //canvas.drawpaint(paint1);          paint1.setstrokewidth(4);         paint1.setcolor(android.graphics.color.yellow);         paint1.setstyle(paint.style.fill_and_stroke);         paint1.setantialias(true);           point a1 = new point(400,350);         point b1 = new point(140,700);         point c1 = new point(700,700);             path path2 = new path();         path2.setfilltype(filltype.even_odd);          path2.moveto(400,350);         path2.lineto(b1.x, b1.y);         path2.lineto(c1.x, c1.y);         path2.lineto(a1.x, a1.y);         path2.close();          canvas.drawpath(path2, paint1);            } 


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -