public bool IntersectWithRectangle(Rec rec) { if (this.ListFold.Count > 0 && this.Rectangle.IntersectsWith(rec.Rectangle)) { if (rec.Rectangle.Y < this.ListFold[0].ListLine[0].P1.Y && rec.Rectangle.Bottom > this.ListFold[0].ListLine[0].P1.Y) { return true; } else { rec.Error = true; return false; } } else return false; }
public void FoldWithRectangle(Rec rec) { this.ListFold = new List<Fold>(); this.FoldWithLine(rec.ListFold[0].ListLine[0].P1, rec.ListFold[0].ListLine[0].P1); }