public static Bitmap GetGridFromScreeshot(Bitmap screenshot, GameMode gameMode) { var pos = GridLocator.LocateGrid(gameMode); return(Crop(screenshot, new Rectangle(pos.X, pos.Y, GridWidth, GridHeight))); }
public static Bitmap GetBlockFromScreenshot(Bitmap screenshot, GameMode gameMode, int coluna, int linha) { var pos = GridLocator.LocateGrid(gameMode); return(Crop(screenshot, new Rectangle(pos.X + (BlockWidth * coluna), pos.Y + (BlockHeight * linha), BlockWidth, BlockHeight))); }