예제 #1
0
파일: ScanLine.cs 프로젝트: LaichR/DrawIt
        public void Remove(LineSegmentDecorator l)
        {
            int count = Count;

            if (l.IsHorizontal)
            {
                _horizontalLines.Remove(l);
            }
            else
            {
                _verticalLines.Remove(l);
            }
            System.Diagnostics.Debug.Assert(Count < count);
        }
예제 #2
0
파일: ScanLine.cs 프로젝트: LaichR/DrawIt
        public ScanLine(LineSegmentDecorator s, double x)
        {
            if (s.IsHorizontal)
            {
                _horizontalLines.Add(s);
            }
            else
            {
                _verticalLines.Add(s);
            }

            _scanPos   = x;
            _connector = s.Connector;
        }
예제 #3
0
 void AddLineSegments(ConnectorUI ui)
 {
     foreach (LineSegmentDecorator l in LineSegmentDecorator.DecorateLineSegments(ui, lineSegments++))
     {
         if (l.IsHorizontal && l.IsVertical) // this is just a point!
         {
             continue;
         }
         _horizontalScan.Add(new ScanLine(l, l.Start.X));
         if (l.IsHorizontal)
         {
             System.Diagnostics.Debug.Assert(l.Start.X < l.End.X);
             _horizontalScan.Add(new ScanLine(l, l.End.X));
         }
     }
 }