public void Remove(LineSegmentDecorator l) { int count = Count; if (l.IsHorizontal) { _horizontalLines.Remove(l); } else { _verticalLines.Remove(l); } System.Diagnostics.Debug.Assert(Count < count); }
public ScanLine(LineSegmentDecorator s, double x) { if (s.IsHorizontal) { _horizontalLines.Add(s); } else { _verticalLines.Add(s); } _scanPos = x; _connector = s.Connector; }
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)); } } }