public void addNewLine(GameObject brush)
{
int lineCount = lines.Count;
int pointCount = (lineCount > 0) ? (lines [lineCount - 1].points.Count) : 0;
if (lineCount > 0 && pointCount > 0) {
Point p = new Point ();
p.pos = lines [lineCount - 1].points [pointCount - 1].pos;
p.parent = lines [lines.Count - 1];
lines [lines.Count - 1].points.Add (p);
}
Line l = new Line ();
l.points = new List<Point> ();
l.opacity = 1f;
Point p0 = new Point ();
p0.pos = brush.transform.position;
p0.color = color;
p0.parent = l;
p0.width = 50;
l.points.Add (p0);
lines.Add (l);
}