asp.net GDI+绘制折线
2024-09-29 00:42:10
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
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(, );
Graphics graphics = Graphics.FromImage(bitmap);
graphics.Clear(Color.White);
Pen pen = new Pen(Color.Black, );
Point[] points = { new Point(, ), new Point(, ), new Point(, ), new Point(, ) };
graphics.DrawLines(pen, points);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
Response.ClearContent();
Response.ContentType = "image/Jpeg";
Response.BinaryWrite(ms.ToArray());
}
}
最新文章
- 安装CentOS7文字界面版后,无法联网,用yum安装软件提示 cannot find a valid baseurl for repo:base/7/x86_64 的解决方法
- Java 中Iterator 、Vector、ArrayList、List 使用深入剖析
- linux vi 删除多行的方法
- 移动端网站的内容触摸滑动-Swiper插件
- C#,Java,C -循环冗余检验:CRC-16-CCITT查表法
- 关于python测试webservice接口的视频分享
- Java魔法堂:以Windows服务的形式运行Java程序
- int和integer;Math.round(11.5)和Math.round(-11.5)
- macbook Android开发环境搭建,真机调试
- jquery easyui datagrid 分页实现---善良公社项目
- 【Impala篇】---Hue从初始到安装应用
- linux 常用命令 和 nginx(反响代理、负载均衡)安装和配置
- python学习-Day1-接口测试
- 限制EditText最多输入n位,设置EditText最大输入长度;
- Beta阶段第三篇Scrum冲刺博客-Day2
- [日常] Go语言圣经-指针对象的方法-bit数组习题
- 【mongoDB运维篇③】replication set复制集
- 4011: [HNOI2015]落忆枫音
- [Javascript] Ternary Conditionals
- java的简单入门,tomcat服务器