Exemple #1
0
 private void changes_checkBox_CheckedChanged(object sender, EventArgs e)
 {
     if (changes_checkBox.Checked)
     {
         Layers.CurrentLayer.Foreground = new Picture(History.HistoryList[History.HistoryList.Count - 1].Picture.OriginalImage);
         form.SomeEvent();
         transforms = new PLL.FreeTransform(Layers.CurrentLayer.Foreground);
         Changes(transforms.Transform);
     }
     if (!changes_checkBox.Checked)
     {
         Layers.CurrentLayer.Foreground = new Picture(History.HistoryList[History.HistoryList.Count - 1].Picture.OriginalImage);
         transforms = new PLL.Transforms(Layers.CurrentLayer.Foreground);
         Changes(transforms.Transform);
     }
 }
Exemple #2
0
        public TransformationForm(Form1 form)
        {
            InitializeComponent();
            this.form = form;
            rotate_trackBar.Scroll += trackBar_ValueChanged;
            trackBar_W.Scroll      += trackBar_ValueChanged;
            trackBar_H.Scroll      += trackBar_ValueChanged;
            trackBar_Y.Scroll      += trackBar_ValueChanged;
            trackBar_X.Scroll      += trackBar_ValueChanged;

            trackBar_W.Maximum = form.pictureBox.Width * 2;
            trackBar_W.Value   = form.pictureBox.Width;
            trackBar_X.Maximum = form.pictureBox.Width;
            trackBar_X.Minimum = -form.pictureBox.Width;

            trackBar_H.Maximum = form.pictureBox.Height * 2;
            trackBar_H.Value   = form.pictureBox.Height;
            trackBar_Y.Maximum = form.pictureBox.Height;
            trackBar_Y.Minimum = -form.pictureBox.Height;

            transforms = new PLL.FreeTransform(Layers.CurrentLayer.Foreground);
        }