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. ClearWater

    How can I just draw a 1x1 pixel in widow app with C#?

    ClearWater, Nov 25, 2003, in forum: Microsoft C# .NET
    Replies:
    3
    Views:
    475
    Guest
    Nov 25, 2003
  2. John
    Replies:
    1
    Views:
    343
    Justin Weinberg
    Nov 26, 2003
  3. Bob Palank

    Point Clouds - Draw One Pixel

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

    Draw on pixel point with GDI+

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

    Draw on pixel point with GDI+

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

    Displaying pixel in a bitmap as a rectangular pixel

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

    , Aug 23, 2007, in forum: Microsoft C# .NET
    Replies:
    2
    Views:
    219
  8. Loren Pechtel

    How to draw a one-pixel line??

    Loren Pechtel, Nov 4, 2009, in forum: Microsoft C# .NET
    Replies:
    33
    Views:
    706
    vanderghast
    Nov 7, 2009
Loading...