Пример #1
0
        Point GetSquareCoordinate(CustomBitmap i)
        {
            for (int x = 0; x < i.Width; x++)
            {
                for (int y = 0; y < i.Height; y++)
                {
                    var color = i.GetPixel(x, y);
                    if (color == 1)
                    {
                        return(new Point(x, y));
                    }
                }
            }

            throw new NoSquareFound(i);
        }
Пример #2
0
 public NoSquareFound(CustomBitmap image) : base("No square found in image.")
 {
     this.image = image;
 }