public void a(Point p1, Point p2, int x, Canvas canvas) {
if (x == 0) {
canvas.drawLine(p1.x, p1.y, p2.x, p2.y, mPaint);
return;
}
// if (p2.x - p1.x > 0 && p2.y - p1.y < 0 || p2.x - p1.x < 0 && p2.y - p1.y > 0)
x = x * -1;
if (p2.x - p1.x >= 0) x = x * -1;
float rr = (float) Math.sqrt((float) Math.pow((p2.y - p1.y), 2) + (