GDI+绘的图,保存成图片

//窗体上添加一个pictureBox,双击paint事件,内部代码如下 private void pictureBox1_Paint(object sender, PaintEventArgs e) { Bitmap bmp = new Bitmap(e.ClipRectangle.Width,e.ClipRectangle.Height); Graphics g = Graphics.FromImage(bmp); Pen penColor = new Pen(Color.Tomato,2); g.DrawArc(penColor, e.ClipRectangle, 0, 360); e.Graphics.DrawImage(bmp, new Point(0, 0)); bmp.Save("C:\\Temp.bmp"); }
posted @ 2012-11-16 11:39  Vic Huang  阅读(467)  评论(0编辑  收藏  举报