当前位置:编程学习 > C#/ASP.NET >>

关于WPF GDI+的问题

以前用VS2005(C#)如以下代码,想用VS2010(WPF)来做,请问该怎么改,好多东西不懂,请多多指教
private Bitmap bmp;

 Graphics g2 = this.canvas3.CreateGraphics();
                    System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath();
                    gp.AddLines(P);

                    Brush b = new SolidBrush(System.Drawing.Color.Black);

                    if (N == M)
                    {
                        b = new SolidBrush(System.Drawing.Color.Black);
                    }
                    else
                    {
                        b = new SolidBrush(System.Drawing.Color.Red);
                    }

                    Graphics g = Graphics.FromImage(bmp);
                    g.FillPath(b, gp);
                    g.Dispose();
                    Pen pen = new Pen(b);
                    g2.FillPath(b, gp);
                    g2.Dispose(); --------------------编程问答-------------------- 没人懂么?
补充:.NET技术 ,  其他语言
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,