예제 #1
0
        private void fillColorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Image Image = pictureBoxCustom1.Image;

            if (Image == null)
            {
                return;
            }

            ImageFillColor dialog = new ImageFillColor();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                if (dialog.ResizeSmall)
                {
                    ActiveTexture.Width  = 1;
                    ActiveTexture.Height = 1;
                }
                Bitmap newImage = BitmapExtension.FillColor((int)ActiveTexture.Width, (int)ActiveTexture.Height, dialog.FillColor);

                HasBeenEdited = true;
                UpdateEditCached(newImage);
                ApplyEdit(newImage);
            }
        }
예제 #2
0
        private void colorSelector1_ColorChanged(object sender, EventArgs e)
        {
            pictureBox1.BackColor = colorSelector1.Color;
            pictureBox2.BackColor = colorSelector1.AlphaColor;

            var fullColor = Color.FromArgb(colorSelector1.Alpha, colorSelector1.Color);

            pictureBoxCustom1.Image = BitmapExtension.FillColor(30, 30, fullColor);
        }