Ejemplo n.º 1
0
 /// <summary>
 /// insert new segment
 /// </summary>
 /// <param name="segment">segment to insert</param>
 public void AddSegment(DES_Segment segment)
 {
     PicSegment picSegment = _factory.AddSegment(
         DesPenToLineType(segment._pen), segment._grp, segment._layer,
         new Vector2D(segment.X1, segment.Y1),
         new Vector2D(segment.X2, segment.Y2));
 }
Ejemplo n.º 2
0
        public void WriteSegment(DES_Segment segment)
        {
            // save in table
            _table.Add(new Pair <uint, uint>(1 /*segment*/, (uint)_br.BaseStream.Position));

            // entity code
            WriteCode(1);
            _br.Write(1); // segment
            // x
            WriteCode(2);
            _br.Write(segment._x); // segment X
            // y
            WriteCode(3);
            _br.Write(segment._y); // segment Y
            // direction
            WriteCode(4);
            _br.Write(segment._dir);
            // dim
            WriteCode(5);
            _br.Write(segment._dim);
            // pen
            WriteCode(150);
            _br.Write(segment._pen);
            // level
            WriteCode(151);
            _br.Write(segment._layer);
            // group
            WriteCode(152);
            _br.Write(segment._grp);
            // lock
            WriteCode(153);
            _br.Write(segment._lock);
        }