Exemplo n.º 1
0
        void UpdateOutput()
        {
            string oneChar = this.textBox1.Text.Trim();

            if (string.IsNullOrEmpty(oneChar))
            {
                return;
            }
            //
            char selectedChar = oneChar[0];

            using (System.Drawing.Graphics gfx = panel1.CreateGraphics())
                using (MemBitmap destImg = new MemBitmap(panel1.Width, panel1.Height))
                {
                    //create mini agg drawboard
                    AggPainter painter = AggPainter.Create(destImg);
                    DrawOutput(painter, _typeface, selectedChar);
                    painter.CopyToGdiPlusGraphics(gfx);
                }
        }