default.aspx.cs
来自「水晶报表详细资料水晶报表详细资料水晶报表详细资料」· CS 代码 · 共 39 行
CS
39 行
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.Drawing.Drawing2D;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Bitmap bitmap = new Bitmap(400, 150);
Graphics g = Graphics.FromImage(bitmap);
g.Clear(Color.WhiteSmoke);
SolidBrush mySolidBrush = new SolidBrush(Color.Red);
GraphicsPath myGraphicsPath = new GraphicsPath();
Pen myPen = new Pen(Color.Blue, 1);
Point[] myPoints = { new Point(30, 50), new Point(50, 80), new Point(200, 100) };
myGraphicsPath.AddArc(15, 20, 80, 50, 210, 120);
myGraphicsPath.StartFigure();
myGraphicsPath.AddCurve(myPoints);
myGraphicsPath.AddString("明日科技---曲线填充", new FontFamily("华文行楷"), (int)FontStyle.Regular, 30, new PointF(20,100), new StringFormat());
myGraphicsPath.AddPie(120, 20, 120, 100, 280, 120);
g.FillPath(mySolidBrush, myGraphicsPath);
g.DrawPath(myPen, myGraphicsPath);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
Response.ClearContent();
Response.ContentType = "image/Gif";
Response.BinaryWrite(ms.ToArray());
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?