Bitmap bm = new Bitmap ( 600 , 300 ) ;
// //创建一个长度为600,宽带为300的Bitmap实例
// Graphics g ;
// g = Graphics.FromImage ( bm ) ;
// //创建一个长度为600,宽带为300的Bitmap实例
// Graphics g ;
// g = Graphics.FromImage ( bm ) ;
调试欢乐多
By eric neff
Creating graphics for use in a Web page is a snap in .NET. Since this graphic will be hosted in an Image server control you will have full access to placement, sizing and other properties.http://www.dotnetjunkies.com/Article/C53A9DAC-7DBC-4844-9472-74119526093D.dcik
// //创建一个长度为600,宽带为300的Bitmap实例
// Graphics g ;
// g = Graphics.FromImage ( bm ) ;
// //由此Bitmap实例创建Graphic实例
// g . Clear ( Color . Snow ) ;
// int i = 20;
// int j = 50;
// Point[] points = {
// new Point(20, 50),
// new Point(100, 10),
// new Point(200, 100),
// new Point(300, 50),
// new Point(400, 80)
// };
//
// Pen pen = new Pen(Color.FromArgb(255, 0, 0, 255));
// g.DrawCurve(pen, points, 0.0f);
// bm.Save ( Response . OutputStream , ImageFormat . Jpeg ) ;