Esempio n. 1
0
        public static ScreenGrab Grab(Win.RECT rect)
        {
            int left   = rect.Left;
            int top    = rect.Top;
            int width  = rect.Right - rect.Left;
            int height = rect.Bottom - rect.Top;

            if (width == 0 || height == 0)
            {
                return(null);
            }
            return(Grab(left, top, width, height));
        }
Esempio n. 2
0
 private static bool PointIsOutsideRect(System.Drawing.Point pt, Win.RECT rect)
 {
     return(pt.Y < rect.Top || pt.X < rect.Left || pt.X > rect.Right || pt.Y > rect.Bottom);
 }