Example #1
0
 public MarkupLine GetCommonLine(IFillerVertex other)
 {
     return(other switch
     {
         EnterSupportPoint otherE => First.ContainsPoint(otherE.Point) ? First : Second,
         IntersectSupportPoint otherI => LinePair.ContainLine(otherI.LinePair.First) ? otherI.LinePair.First : otherI.LinePair.Second,
         _ => null,
     });
Example #2
0
 public IEnumerable<IFillerVertex> GetNextCandidates(MarkupFiller filler, IFillerVertex prev)
 {
     switch (prev)
     {
         case EnterFillerVertex prevE:
             return filler.GetLinePoints(this, First.ContainsPoint(prevE.Point) ? Second : First);
         case IntersectFillerVertex prevI:
             return filler.GetLinePoints(this, prevI.LinePair.ContainLine(First) ? Second : First);
         default:
             return GetNextEmptyCandidates(filler);
     }
 }
Example #3
0
 public MarkupLine GetCommonLine(IFillerVertex other)
 {
     switch (other)
     {
         case EnterSupportPoint otherE:
             return First.ContainsPoint(otherE.Point) ? First : Second;
         case IntersectSupportPoint otherI:
             return LinePair.ContainLine(otherI.LinePair.First) ? otherI.LinePair.First : otherI.LinePair.Second;
         default:
             return null;
     }
 }