TOPN3DPIE.ASPX ------------------- <% @ page language = "c #" codebehind = "TOPN3DPIE.ASPX.CS" autoeventwireup = "false" inherits = "Yeefly.topn3dpie "%> Topn3dpie.aspx.cs ---------------------- Using System; Using System.Collections; Using System.ComponentModel; Using System.Data; Using System.drawing; Using System.drawing; .Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Drawing.Imaging; using System.Drawing.Drawing2D; using System.IO;
Namespace Yeefly {///
INT Piewidth = 120, Pieheight = 40, pieshadow = 15; int [] arrvote = {70, 90, 80, 20, 60, 40}; Random Oran = New Random ();
Bitmap objBitmap = new Bitmap (width, height); Graphics objGraphics = Graphics.FromImage (objBitmap); objGraphics.DrawRectangle (new Pen (Color.Black), 0,0, width, height); objGraphics.FillRectangle (new SolidBrush (Color . White, 1, 1, Width - 2, Height - 2); Solidbrush Objbrush = New Solidbrush (Color.Blue); ObjGraphics.SmoothingMode = SMOOTHINGMODE.Antialias; int icrrentpos = 0;
Color [] Arrcolor = {Color.red, Color.red, Color.Red, Color.Red, Color.Red, Color.red};
For (int i = arrvote.length - 1; i> = 0; I -) {Arrcolor [i] = color.fromargb (ORAN.NEXT (255), ORAN.NEXT (255) }
For (int i = arrvote.length - 1; i> = 0; I -) {objbrush.color = arrcolor [i]; for (int iLoop2 = 0; iLoop2
Objbitmap.save (response.outputstream, imageformat.jpeg); // clean Up ... Objgraphics.dispose (); objbitmap.dispose ();
#Region Web Form Designer Generated Code Override Protected Void OnNit (Eventargs E) {// // Codegen: This call is required for the ASP.NET Web Form Designer. // InitializeComponent (); base.onit (e);} ///