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)); }
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); }