public static void Write(this BinaryWriter writer, makeLine.Line l) { writer.Write(l.points.Count); foreach (var p in l.points) { writer.Write(p); } }
public static makeLine.Line ReadLine(this BinaryReader reader) { var countPoints = reader.ReadInt32(); var l = new makeLine.Line(); var points = new List<makeLine.Point>(); for(var i = 0; i < countPoints; i++) { var p = reader.ReadPoint(); p.parent = l; points.Add(p); } l.points = points; l.opacity = 1f; return l; }
public static makeLine.Line ReadLine(this BinaryReader reader) { var countPoints = reader.ReadInt32(); var l = new makeLine.Line(); var points = new List <makeLine.Point>(); for (var i = 0; i < countPoints; i++) { var p = reader.ReadPoint(); p.parent = l; points.Add(p); } l.points = points; l.opacity = 1f; return(l); }