public static bool Equals(Rect rect1, Rect rect2) { if (rect1.IsEmpty) { return rect2.IsEmpty; } return (((rect1.X.Equals(rect2.X) && rect1.Y.Equals(rect2.Y)) && rect1.Width.Equals(rect2.Width)) && rect1.Height.Equals(rect2.Height)); }
protected virtual bool DoesntContain(Rect rect, double otherStart, double otherEnd) { if (rect.Equals(Rect.Empty)) return true; double center = (otherStart + otherEnd)/2; if (center.IsInvalid()) return true; return center < start || center > end; }