public void Write(DrawingData value) { Write(value.Strokes.Count); foreach (Stroke stroke in value.Strokes) { Write(stroke); } }
/// <summary> /// Performs a deep copy of this drawing data. /// </summary> public DrawingData Clone() { DrawingData d = new DrawingData(); foreach (Stroke stroke in Strokes) { d.Strokes.Add(stroke.Clone()); } return(d); }
/// <summary> /// Reads the paint stroke data for one drawing. /// </summary> public DrawingData ReadDrawingData() { DrawingData pl = new DrawingData(); int count = ReadInt32(); pl.Strokes = new List <Stroke>(); for (int i = 0; i < count; i++) { pl.Strokes.Add(ReadStroke()); } return(pl); }