Point Clouds - Draw One Pixel

B

Bob Palank

Anyone ever try to place one pixel on the drawing surface ?

The code below provides two pixels. When x+1 is changed to x, nothing is
drawn. So I guess the shortest line is two pixels.

Graphics g = e.Graphics; // Grt a drawing Surface
Pen redPen = Pens.Red;
int x = 50;
int y =50;
g.DrawLine(redPen, x, y, x+1, y);

Anyone know how to place one pixel on the surface ?

TIA

Bob
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top