Beispiel #1
0
 public bool Contains(Rect r, bool insideOnly)
 {
     if (Contains(r.TopLeft(), insideOnly) && Contains(r.BottomRight(), insideOnly))
     {
         return(true);
     }
     return(false);
 }
Beispiel #2
0
        public void AlignIn(Rect r, AlignmentFlag align)
        {
            switch (align)
            {
            case AlignmentFlag.AlignTopLeft:
                MoveTopLeft(r.TopLeft());
                break;

            case AlignmentFlag.AlignTopRight:
                MoveTopRight(r.TopRight());
                break;

            case AlignmentFlag.AlignTopCenter:
                MoveTopCenter(r.TopCenter());
                break;

            case AlignmentFlag.AlignBottomLeft:
                MoveBottomLeft(r.BottomLeft());
                break;

            case AlignmentFlag.AlignBottomRight:
                MoveBottomRight(r.BottomRight());
                break;

            case AlignmentFlag.AlignBottomCenter:
                MoveBottomCenter(r.BottomCenter());
                break;

            case AlignmentFlag.AlignLeftCenter:
                MoveCenterLeft(r.CenterLeft());
                break;

            case AlignmentFlag.AlignCenter:
                MoveCenter(r.Center());
                break;

            case AlignmentFlag.AlignRightCenter:
                MoveCenterRight(r.CenterRight());
                break;
            }
        }