Dzwebs.Net

撰写电脑技术杂文十余年

asp.net图形显示函数

Admin | 2007-12-23 12:11:21 | 被阅次数 | 6258

温馨提示!

如果未能解决您的问题,请点击搜索;登陆可复制文章,点击登陆

 private void DrawGraphic(double UnReadyNum,double ReadyNum,double FinishNum)
          {
             double iPercentAngle;
 
             iPercentAngle = 360 / (UnReadyNum + ReadyNum + FinishNum);
 
             //生成一個Bitmap
             Bitmap objBitmap;
             objBitmap = new Bitmap(450,400,PixelFormat.Format64bppPArgb);
 
 
             //生成一個Graphics,同時清除Bitmap的背景色為White.
             Graphics objGraphics;
             objGraphics = Graphics.FromImage(objBitmap);
             objGraphics.Clear(Color.White);
 
             //畫圖
             objGraphics.FillEllipse(Brushes.Red,120,10,200,200);
             objGraphics.FillPie(Brushes.Orange,120,10,200,200,0,(float)(ReadyNum*iPercentAngle));
             objGraphics.FillPie(Brushes.Green,120,10,200,200,(float)(ReadyNum*iPercentAngle),(float)(FinishNum*iPercentAngle));
 
             objBitmap.Save(Response.OutputStream,ImageFormat.Gif);
         }


该杂文来自: 网站开发杂文

上一篇:通过VS2005如何发布网站

下一篇:将ASP.NET页面内的数据导出到Excel或Word中

网站备案号:

网站备案号:滇ICP备11001339号-7

版权属性:

Copyright 2007-2021-forever Inc. all Rights Reserved.

联系方式:

Email:dzwebs@126.com QQ:83539231 访问统计