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.Imaging; public partial class slaideripilt : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { int korgus = 15; int laius = 100; int arv = 10; if (Request.QueryString["arv"] != null) { Int32.TryParse(Request.QueryString["arv"], out arv); } if (Request.QueryString["laius"] != null) { Int32.TryParse(Request.QueryString["laius"], out laius); } if (Request.QueryString["korgus"] != null) { Int32.TryParse(Request.QueryString["korgus"], out korgus); } Bitmap pilt = new Bitmap(laius, korgus); Graphics g = Graphics.FromImage(pilt); g.FillRectangle(Brushes.White, 0, 0, laius, korgus); float kujundiruum = laius*1.0f/arv; for (int i = 0; i < arv; i++) { g.DrawEllipse(Pens.Blue, i * kujundiruum, 2, kujundiruum * 2 / 3, korgus - 4); } Response.ContentType = "image/gif"; pilt.Save(Response.OutputStream, ImageFormat.Gif); } }