using System;
using System.Data;
using System.Configuration;
using System.Collections;
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.Imaging;
namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
public Bitmap bmp = null;
public Font f = null;
protected void Page_Load(object sender, EventArgs e)
{
bmp= new Bitmap(250, 250);
Graphics gph =Graphics.FromImage(bmp);
Pen p = new Pen(Color.Black);
Font littletext = new Font("Times New Roman", 6);
gph.DrawLine(p, 10, 10, 10, 240);
gph.DrawLine(p, 10, 240,240,240);
gph.DrawString("2000", littletext, Brushes.Black, 23, 240);
gph.DrawString("2001", littletext, Brushes.Black, 46, 240);
gph.DrawString("2002", littletext, Brushes.Black, 69, 240);
gph.DrawString("2003", littletext, Brushes.Black, 92, 240);
gph.DrawString("2004", littletext, Brushes.Black, 115, 240);
gph.DrawString("2005", littletext, Brushes.Black, 138, 240);
gph.DrawString("2006", littletext, Brushes.Black, 161, 240);
gph.DrawString("2007", littletext, Brushes.Black, 184, 240);
gph.DrawString("2008", littletext, Brushes.Black, 207, 240);
gph.DrawString("2009", littletext, Brushes.Black, 230, 240);
gph.DrawString("10", littletext, Brushes.Black, 2, 10);
gph.DrawString("9", littletext, Brushes.Black, 4, 33);
gph.DrawString("8", littletext, Brushes.Black, 4, 56);
gph.DrawString("7", littletext, Brushes.Black, 4, 79);
gph.DrawString("6", littletext, Brushes.Black, 4, 102);
gph.DrawString("5", littletext, Brushes.Black, 4, 125);
gph.DrawString("4", littletext, Brushes.Black, 4, 148);
gph.DrawString("3", littletext, Brushes.Black, 4, 171);
gph.DrawString("2", littletext, Brushes.Black, 4, 194);
gph.DrawString("1", littletext, Brushes.Black, 4, 217);
gph.DrawLine(p, 10, 240, 23, 194);
gph.DrawLine(p, 23, 194,46,171);
gph.DrawLine(p, 46, 171, 69,125);
gph.DrawLine(p, 69,125,92,148);
//gph.DrawLine(p, 92, 148, );
//gph.DrawLine(p, 10, 240, 23, 194);
//gph.DrawLine(p, 10, 240, 23, 194);
//gph.DrawLine(p, 10, 240, 23, 194);
bmp.Save(Server.MapPath("/") + "sample.jpeg");
}
protected void btnsave_Click(object sender, EventArgs e)
{
}
}
}
using System.Data;
using System.Configuration;
using System.Collections;
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.Imaging;
namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
public Bitmap bmp = null;
public Font f = null;
protected void Page_Load(object sender, EventArgs e)
{
bmp= new Bitmap(250, 250);
Graphics gph =Graphics.FromImage(bmp);
Pen p = new Pen(Color.Black);
Font littletext = new Font("Times New Roman", 6);
gph.DrawLine(p, 10, 10, 10, 240);
gph.DrawLine(p, 10, 240,240,240);
gph.DrawString("2000", littletext, Brushes.Black, 23, 240);
gph.DrawString("2001", littletext, Brushes.Black, 46, 240);
gph.DrawString("2002", littletext, Brushes.Black, 69, 240);
gph.DrawString("2003", littletext, Brushes.Black, 92, 240);
gph.DrawString("2004", littletext, Brushes.Black, 115, 240);
gph.DrawString("2005", littletext, Brushes.Black, 138, 240);
gph.DrawString("2006", littletext, Brushes.Black, 161, 240);
gph.DrawString("2007", littletext, Brushes.Black, 184, 240);
gph.DrawString("2008", littletext, Brushes.Black, 207, 240);
gph.DrawString("2009", littletext, Brushes.Black, 230, 240);
gph.DrawString("10", littletext, Brushes.Black, 2, 10);
gph.DrawString("9", littletext, Brushes.Black, 4, 33);
gph.DrawString("8", littletext, Brushes.Black, 4, 56);
gph.DrawString("7", littletext, Brushes.Black, 4, 79);
gph.DrawString("6", littletext, Brushes.Black, 4, 102);
gph.DrawString("5", littletext, Brushes.Black, 4, 125);
gph.DrawString("4", littletext, Brushes.Black, 4, 148);
gph.DrawString("3", littletext, Brushes.Black, 4, 171);
gph.DrawString("2", littletext, Brushes.Black, 4, 194);
gph.DrawString("1", littletext, Brushes.Black, 4, 217);
gph.DrawLine(p, 10, 240, 23, 194);
gph.DrawLine(p, 23, 194,46,171);
gph.DrawLine(p, 46, 171, 69,125);
gph.DrawLine(p, 69,125,92,148);
//gph.DrawLine(p, 92, 148, );
//gph.DrawLine(p, 10, 240, 23, 194);
//gph.DrawLine(p, 10, 240, 23, 194);
//gph.DrawLine(p, 10, 240, 23, 194);
bmp.Save(Server.MapPath("/") + "sample.jpeg");
}
protected void btnsave_Click(object sender, EventArgs e)
{
}
}
}
Comments
Post a Comment