コード例 #1
0
 public bool IntersectsWith(GpRectF rect)
 {
     return(GetLeft() < rect.GetRight() &&
            GetTop() < rect.GetBottom() &&
            GetRight() > rect.GetLeft() &&
            GetBottom() > rect.GetTop());
 }
コード例 #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());
        }
コード例 #3
0
ファイル: SimpleTypes.cs プロジェクト: intille/mitessoftware
    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();
    }
コード例 #4
0
ファイル: SimpleTypes.cs プロジェクト: intille/mitessoftware
 public bool IntersectsWith(GpRectF rect)
 {
     return (GetLeft() < rect.GetRight() &&
             GetTop() < rect.GetBottom() &&
             GetRight() > rect.GetLeft() &&
             GetBottom() > rect.GetTop());
 }
コード例 #5
0
ファイル: SimpleTypes.cs プロジェクト: intille/mitessoftware
 public bool Contains(GpRectF rect)
 {
     return (X <= rect.X) && (rect.GetRight() <= GetRight()) &&
            (Y <= rect.Y) && (rect.GetBottom() <= GetBottom());
 }
コード例 #6
0
 public bool Contains(GpRectF rect)
 {
     return((X <= rect.X) && (rect.GetRight() <= GetRight()) &&
            (Y <= rect.Y) && (rect.GetBottom() <= GetBottom()));
 }