Exemplo n.º 1
0
 // 正旋轉
 private void radioButton1_CheckedChanged(object sender, EventArgs e)
 {
     if (radioButton1.Checked == true)
     {
         pcxAfter = new ImgPcx(pcxOrigin);
         // double.Parse() : 字串轉為double
         pcxAfter.RotateForward(double.Parse(textBox1.Text));
         pictureBox1.Image = pcxAfter.pcxImg;
     }
 }
Exemplo n.º 2
0
        // 旋轉角度拉條
        private void trackBar1_ValueChanged(object sender, EventArgs e)
        {
            int value = trackBar1.Value;

            textBox1.Text = value.ToString();
            if (radioButton1.Checked == true)
            {
                pcxAfter = new ImgPcx(pcxOrigin);
                // double.Parse() : 字串轉為double
                pcxAfter.RotateForward(value);
                pictureBox1.Image = pcxAfter.pcxImg;
            }
            else if (radioButton2.Checked == true)
            {
                pcxAfter = new ImgPcx(pcxOrigin);
                // double.Parse() : 字串轉為double
                pcxAfter.RotateBackward(value);
                pictureBox1.Image = pcxAfter.pcxImg;
            }
        }