Created
October 16, 2014 08:00
-
-
Save ZirconCode/59cae1e2615279eafb29 to your computer and use it in GitHub Desktop.
Revisions
-
ZirconCode created this gist
Oct 16, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ public void drawTriangle(Point p1, Point p2, Point p3, int clr, Canvas c) { Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); paint.setStrokeWidth(1); paint.setColor(clr); paint.setStyle(Paint.Style.FILL_AND_STROKE); paint.setAntiAlias(true); Path path = new Path(); path.setFillType(Path.FillType.EVEN_ODD); path.moveTo(p1.x,p1.y); path.lineTo(p2.x,p2.y); path.lineTo(p3.x,p3.y); path.close(); c.drawPath(path, paint); }