Draw a one pixel point with GDI+

Discussion in 'Microsoft C# .NET' started by Pat Keel, Jun 8, 2004.

  1. Pat Keel

    Pat Keel Guest

    Hi there,
    I'm looking for a solution to draw a one pixel sized point to a graphics
    control. E.g. DrawLine(10,10, 11,11) draws 2 pixels, DrawLine(10,10,
    10,10) has no effect.
    How to do?
    Thanks
    Pat
     
    Pat Keel, Jun 8, 2004
    #1
    1. Advertisements

  2. Hi,

    Possibly not the best solution, but you can use GDI's SetPixel method
    through P/Invoke.

    --
    Sincerely,
    Dmitriy Lapshin [C# / .NET MVP]
    Bring the power of unit testing to the VS .NET IDE today!
    http://www.x-unity.net/teststudio.aspx

    "Pat Keel" <> wrote in message
    news:40c61389$0$21334$...
    > Hi there,
    > I'm looking for a solution to draw a one pixel sized point to a graphics
    > control. E.g. DrawLine(10,10, 11,11) draws 2 pixels, DrawLine(10,10,
    > 10,10) has no effect.
    > How to do?
    > Thanks
    > Pat
     
    Dmitriy Lapshin [C# / .NET MVP], Jun 9, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob Palank

    Point Clouds - Draw One Pixel

    Bob Palank, Feb 25, 2004, in forum: Microsoft C# .NET
    Replies:
    2
    Views:
    305
    Morten Wennevik
    Feb 25, 2004
  2. Pat Keel

    Draw on pixel point with GDI+

    Pat Keel, Jun 8, 2004, in forum: Microsoft C# .NET
    Replies:
    0
    Views:
    325
    Pat Keel
    Jun 8, 2004
  3. Pat Keel

    Draw on pixel point with GDI+

    Pat Keel, Jun 8, 2004, in forum: Microsoft C# .NET
    Replies:
    4
    Views:
    351
    Pat Keel
    Jun 9, 2004
  4. Piotrekk

    Displaying pixel in a bitmap as a rectangular pixel

    Piotrekk, Aug 20, 2007, in forum: Microsoft C# .NET
    Replies:
    4
    Views:
    321
    Peter Duniho
    Aug 20, 2007
  5. How to draw only one pixel on form

    , Aug 23, 2007, in forum: Microsoft C# .NET
    Replies:
    2
    Views:
    157
Loading...

Share This Page