怎样在Asp.net的web页面中 画一个三角形和一条线 没人 帮忙嘛简单问题阿解决了 立刻 接铁在线等 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 帮你写了一个:在.aspx.cs中:先using:using System.Drawing.Drawing2D;using System.Drawing.Imaging;在Page_Load事件中添加://定义图像的宽度、高度int width=200;int height=200;Bitmap b=new Bitmap(width,height);Graphics g=Graphics.FromImage(b);g.Clear(Color.Yellow);//清除整个绘图面以背景色填充g.SmoothingMode=SmoothingMode.AntiAlias;//画一条直线Pen p=new Pen(Color.Red);g.DrawLine(p,20,100,180,180);//画三角形GraphicsPath gp=new GraphicsPath();gp.StartFigure();gp.AddLine(100,10,10,100);gp.AddLine(10,100,190,100);gp.CloseFigure();Region reg=new Region(gp);g.FillRegion(Brushes.Green,reg);//设置输出图像格式Response.ContentType="image/Gif";b.Save(Response.OutputStream,ImageFormat.Gif);reg.Dispose();gp.Dispose();b.Dispose();g.Dispose(); 网页数据采集问题(急!) 请问为什么我在用户控件中画动态菜单时是竖的而不是横的 为什么 上传图片后 变大很大? 【特别奇怪的问题 】URL重写 + 多个aspx页面对应同一个aspx.cs 页面 = 出现问题。 关于上传文件 file 奇怪的问题:已经有正则表达式,求解 hgknight、webdiyer、acewang、cuike519和所有高手进来,datagird的问题 asp.net 如何修改gridview表头 如何提取一个字段里被||分割的字符串,并生成超连接 关于不是绑定字段的排序问题 送分题:怎么隐藏DataGrid中的“删除”按钮列? web 中的timer空间的小问题
先using:
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;在Page_Load事件中添加:
//定义图像的宽度、高度
int width=200;
int height=200;Bitmap b=new Bitmap(width,height);
Graphics g=Graphics.FromImage(b);
g.Clear(Color.Yellow);//清除整个绘图面以背景色填充g.SmoothingMode=SmoothingMode.AntiAlias;//画一条直线
Pen p=new Pen(Color.Red);
g.DrawLine(p,20,100,180,180);//画三角形
GraphicsPath gp=new GraphicsPath();
gp.StartFigure();
gp.AddLine(100,10,10,100);
gp.AddLine(10,100,190,100);
gp.CloseFigure();
Region reg=new Region(gp);
g.FillRegion(Brushes.Green,reg);//设置输出图像格式
Response.ContentType="image/Gif";
b.Save(Response.OutputStream,ImageFormat.Gif);reg.Dispose();
gp.Dispose();
b.Dispose();
g.Dispose();