locked
How to draw a circle and their different angles on web page. RRS feed

  • Question

  • User-1439385708 posted

      How to draw a circle and their different angles on web page.

                        Whatever angle user can putted then that angle circle should be shaded with a color.

     

    Thursday, June 19, 2008 5:18 AM

Answers

  • User-738352979 posted

    using System.Drawing.Drawing2D;

    using System.Drawing;

    using System.Drawing.Imaging;

    public partial class Default4 : System.Web.UI.Page

    {

    protected void Page_Load(object sender, EventArgs e)

    {

    Bitmap bmp = new Bitmap(400, 400);

    Graphics g = Graphics.FromImage(bmp);

    Pen p = new Pen(Color.Red);Rectangle rec = new Rectangle(10, 10, 100, 100);

    g.DrawEllipse(p,rec);

    Response.ContentType = "image/jpeg" ;

    bmp.Save(Response.OutputStream,ImageFormat.Jpeg);

     

     

    }

    }

     

    for other thing u can use brushes and all to draw anble.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 19, 2008 5:49 AM

All replies

  • User-976791803 posted

    Hai Take a look to this article .

     

    http://www.codeproject.com/KB/aspnet/JsOOP1.aspx

    Thursday, June 19, 2008 5:29 AM
  • User-738352979 posted

    using System.Drawing.Drawing2D;

    using System.Drawing;

    using System.Drawing.Imaging;

    public partial class Default4 : System.Web.UI.Page

    {

    protected void Page_Load(object sender, EventArgs e)

    {

    Bitmap bmp = new Bitmap(400, 400);

    Graphics g = Graphics.FromImage(bmp);

    Pen p = new Pen(Color.Red);Rectangle rec = new Rectangle(10, 10, 100, 100);

    g.DrawEllipse(p,rec);

    Response.ContentType = "image/jpeg" ;

    bmp.Save(Response.OutputStream,ImageFormat.Jpeg);

     

     

    }

    }

     

    for other thing u can use brushes and all to draw anble.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 19, 2008 5:49 AM