Beispiel #1
0
 private void UseBackground_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBox1.Checked)
     {
         button3.BackColor = SpriteLib.GetMostCommon(new Bitmap(image));
     }
 }
Beispiel #2
0
        private void MakeTransparent_Click(object sender, EventArgs e)
        {
            Color c = button3.BackColor;

            if (checkBox1.Checked)
            {
                c = SpriteLib.GetMostCommon(new Bitmap(image));
            }

            Bitmap bmp = new Bitmap(image);

            bmp.MakeTransparent(c);

            pictureBox1.Image = bmp;
        }
Beispiel #3
0
        private void GenerateSprites()
        {
            if (radioButton1.Checked)
            {
                //Anti-clockwise
                sprites = SpriteLib.RotateImageAnti_clockwise(pictureBox1.Image, int.Parse(textBox1.Text));
            }
            else if (radioButton2.Checked)
            {
                //Clockwise
                sprites = SpriteLib.RotateImageClockwise(pictureBox1.Image, int.Parse(textBox1.Text));
            }

            spritesViewer1.LoadImages(sprites);
        }