示例#1
0
        private void refreshPicture()
        {
            if (Matrix == null)
            {
                return;
            }
            Bitmap b = Potrace.BinaryToBitmap(Matrix, true);

            imgPhoto.Source = BitmapToImageSource(b);
        }
示例#2
0
        /// <summary>
        /// refresh picture
        /// </summary>
        private void refreshPicture()
        {
            if (Matrix == null)
            {
                return;
            }
            if (radioButton1.Checked)
            {
                Bitmap B = Potrace.BinaryToBitmap(Matrix, true);
                pictureBox1.Width  = B.Width * (trackBar1.Value + 1);
                pictureBox1.Height = B.Height * (trackBar1.Value + 1);
                pictureBox1.Image  = B;
            }
            else
            {
                Bitmap B = new Bitmap(Matrix.GetLength(0) * (trackBar2.Value + 1), Matrix.GetLength(1) * (trackBar2.Value + 1));
                pictureBox1.Width  = B.Width;
                pictureBox1.Height = B.Height;
                pictureBox1.Image  = B;
            }

            draw();
        }