Exemple #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            waterMark = (Bitmap)pbWaterMark.Image;//new Bitmap(Application.StartupPath + "\\waterMark.png");

            bmpSource = new Bitmap(200, 300);
            Graphics g = Graphics.FromImage(bmpSource);

            g.FillRectangle(new SolidBrush(Color.LightGray), 0, 0, bmpSource.Width, bmpSource.Height);

            ds           = new DynamicShading();
            ds.Threshold = (int)numThresh.Value;
            doProcessing(bmpSource);
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            //waterMark = (Bitmap)pbWaterMark.Image;//new Bitmap(Application.StartupPath + "\\waterMark.png");
            waterMark = new Bitmap(250, 60);
            Graphics gw = Graphics.FromImage(waterMark);
            Font     f  = new Font("Arial", 12, FontStyle.Bold);

            gw.FillRectangle(Brushes.White, 0, 0, waterMark.Width, waterMark.Height);
            gw.DrawRectangle(new Pen(Color.Black, 3), 0, 0, waterMark.Width - 6, waterMark.Height - 6);
            gw.DrawString("Rendered with Dynamic Shader", f, Brushes.Black, 0, 0);
            gw.DrawString("http://www.cmsoft.com.br", f, Brushes.Black, 0, 16);
            gw.DrawString("*****@*****.**", f, Brushes.Black, 0, 32);


            bmpSource = new Bitmap(200, 300);
            Graphics g = Graphics.FromImage(bmpSource);

            g.FillRectangle(new SolidBrush(Color.LightGray), 0, 0, bmpSource.Width, bmpSource.Height);

            ds           = new DynamicShading();
            ds.Threshold = (int)numThresh.Value;
            doProcessing(bmpSource);
        }