Ejemplo n.º 1
0
 public bool IntersectsWith(GpRectF rect)
 {
     return(GetLeft() < rect.GetRight() &&
            GetTop() < rect.GetBottom() &&
            GetRight() > rect.GetLeft() &&
            GetBottom() > rect.GetTop());
 }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
    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();
    }
Ejemplo n.º 4
0
 public bool IntersectsWith(GpRectF rect)
 {
     return (GetLeft() < rect.GetRight() &&
             GetTop() < rect.GetBottom() &&
             GetRight() > rect.GetLeft() &&
             GetBottom() > rect.GetTop());
 }
Ejemplo n.º 5
0
 public bool Contains(GpRectF rect)
 {
     return (X <= rect.X) && (rect.GetRight() <= GetRight()) &&
            (Y <= rect.Y) && (rect.GetBottom() <= GetBottom());
 }
Ejemplo n.º 6
0
 public bool Contains(GpRectF rect)
 {
     return((X <= rect.X) && (rect.GetRight() <= GetRight()) &&
            (Y <= rect.Y) && (rect.GetBottom() <= GetBottom()));
 }