예제 #1
0
        private void rotationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (img == null)             // verify if the image is already opened
            {
                return;
            }
            Cursor = Cursors.WaitCursor;             // clock cursor

            InputBox form = new InputBox("Input angle (Deg)");

            form.ShowDialog();
            float angle = (float)ImageClass.ConvertDegreesToRadians(double.Parse(form.ValueTextBox.Text));

            //copy Undo Image
            imgUndo = img.Copy();

            ImageClass.Rotation(img, imgUndo, angle);

            ImageViewer.Image = img.Bitmap;
            ImageViewer.Refresh();             // refresh image on the screen

            Cursor = Cursors.Default;          // normal cursor
        }