示例#1
0
 public void Write(DrawingData value)
 {
     Write(value.Strokes.Count);
     foreach (Stroke stroke in value.Strokes)
     {
         Write(stroke);
     }
 }
示例#2
0
        /// <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);
        }
示例#3
0
        /// <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);
        }