color a pixel

  • Thread starter Thread starter Mart
  • Start date Start date
M

Mart

Hi,

I want to color a pixel.
This doesn't work:
e.Graphics.DrawLine(new Pen(color), column, row, column, row);

This does work, but it draws 2 pixels wide instead of 1:

e.Graphics.DrawLine(new Pen(color), column, row, column+1, row);

How can I color 1 pixel?

I am working with the compact framework.

Thanks in advance

Mart
 
The only way I know of doing this is by directly modifying pixels on a
bitmap. You can use Bitmap.SetPixel(X, Y, Color);


--
I hope this helps

--
Norman Rericha
Senior Software Engineer
Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member
 
Back
Top