private void Page_Load(object sender, System.EventArgs e) { Curve curve2d = new Curve(); //定义一个画图类实例 Bitmap bmp = curve2d.CreateImage(); //bmp.Save(Response.OutputStream,ImageFormat.Jpeg); bmp.Save(@"E:\Curve.jpg",ImageFormat.Jpeg); }
protected void Button1_Click(object sender, EventArgs e) { Curve curve2d = new Curve(); //定义一个画图类实例 curve2d.Title = "马王堆"; curve2d.Height = 100; curve2d.TextColor = Color.Red; curve2d.BgColor = Color.White; curve2d.TextColor = Color.Red; curve2d.Keys = new String[]{"1","2","5"}; Bitmap bmp = curve2d.CreateImage(); bmp.Save(Server.MapPath("Curve.jpg"), ImageFormat.Jpeg); Image1.Visible = true; }