all groups > dotnet drawing api > march 2008 >
You're in the

dotnet drawing api

group:

draw a line from 0 to 52 does the last pixel of the line show?


draw a line from 0 to 52 does the last pixel of the line show? AAaron123
3/26/2008 12:21:20 PM
dotnet drawing api:
If I have a panel with a client sizes of 52x52 and I draw a line from 0 to
52 does the last pixel of the line show?

Thanks in advance


Re: draw a line from 0 to 52 does the last pixel of the line show? Bob Powell [MVP]
3/26/2008 10:44:55 PM
No because the window pixel range is zero based so the reange will be from
0-51 = 52 pixels wide.



--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

[quoted text, click to view]
Re: draw a line from 0 to 52 does the last pixel of the line show? AAaron123
3/27/2008 4:42:01 PM
So each pixel has a index.

Not like a ruler where 0-1 is 1 inch; not 2.

Seems I remember years ago that Petzold said that with the win32 0-1 was one
pixel, but I'm not sure about that.


Thanks for the info!


[quoted text, click to view]

Re: draw a line from 0 to 52 does the last pixel of the line show? AAaron123
3/27/2008 5:57:30 PM
thanks
[quoted text, click to view]

Re: draw a line from 0 to 52 does the last pixel of the line show? Bob Powell [MVP]
3/27/2008 10:12:19 PM
In the default mode, a unit in world coordinates maps to a single pixel on
the screen. By changing the page units to, say inch, point or millimeter the
world units will correspond to the chosen standard.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


[quoted text, click to view]
AddThis Social Bookmark Button