public bool IntersectsWith(GpRectF rect) { return(GetLeft() < rect.GetRight() && GetTop() < rect.GetBottom() && GetRight() > rect.GetLeft() && GetBottom() > rect.GetTop()); }
static public bool Union(out GpRectF c, GpRectF a, GpRectF b) { float right = Math.Max(a.GetRight(), b.GetRight()); float bottom = Math.Max(a.GetBottom(), b.GetBottom()); float left = Math.Min(a.GetLeft(), b.GetLeft()); float top = Math.Min(a.GetTop(), b.GetTop()); c.X = left; c.Y = top; c.Width = right - left; c.Height = bottom - top; return(!c.IsEmptyArea()); }
static public bool Union(out GpRectF c, GpRectF a, GpRectF b) { float right = Math.Max(a.GetRight(), b.GetRight()); float bottom = Math.Max(a.GetBottom(), b.GetBottom()); float left = Math.Min(a.GetLeft(), b.GetLeft()); float top = Math.Min(a.GetTop(), b.GetTop()); c.X = left; c.Y = top; c.Width = right - left; c.Height = bottom - top; return !c.IsEmptyArea(); }
public bool IntersectsWith(GpRectF rect) { return (GetLeft() < rect.GetRight() && GetTop() < rect.GetBottom() && GetRight() > rect.GetLeft() && GetBottom() > rect.GetTop()); }
public bool Contains(GpRectF rect) { return (X <= rect.X) && (rect.GetRight() <= GetRight()) && (Y <= rect.Y) && (rect.GetBottom() <= GetBottom()); }
public bool Contains(GpRectF rect) { return((X <= rect.X) && (rect.GetRight() <= GetRight()) && (Y <= rect.Y) && (rect.GetBottom() <= GetBottom())); }