Example #1
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            Point localMousePosition = pictureBox1.PointToClient(Cursor.Position);
            int   x = localMousePosition.X / 32;
            int   y = localMousePosition.Y / 32;

            Directions8Way dir = Directions8WayHelper.GetDirectionFromGrid(x, y);

            _imageEditor.SetDirection(dir);
        }
 public void ShouldGetDirection(int x, int y, Directions8Way expectedDir)
 {
     Directions8WayHelper.GetDirectionFromGrid(x, y).Should().Be(expectedDir);
 }