CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    103

    Draw a line on a bitmap?

    How do you draw a line on a bitmap object?
    Thanks...

  2. #2
    Join Date
    Mar 2007
    Posts
    90

    Re: Draw a line on a bitmap?

    Code:
    Bitmap buffer = new Bitmap(100, 100);
    Graphics graphics = Graphics.FromImage(buffer);
    graphics.DrawLine(new Pen(Color.Red), 0, 0, buffer.Width, buffer.Height);
    graphics.Dispose();
    Last edited by someuser77; May 6th, 2008 at 03:11 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured