F
Fred West
I create a user control with width = 200 pixels and height = 200 pixels. I
create a paint event handler to draw a rectangle around its edges. I define
a Rectangle as follows:
Rectangle r = new Rectangle(0,0,200,200);
I then draw it in my event handler as follows:
dc = e.Graphics;
dc.DrawRectangle(mypen,r);
BUT the right and bottom edges are clipped! I would expect that since my
blank user control has the same size it should fit perfectly in side. If I
define my rectangle as
Rectangle r = new Rectangle(0,0,199,199);
then all is well. Do I interpret this to mean that height and width for the
rectangle refer to the white space inside and not its border. Any comments
are appreciated.
- Fred using VS2003 (C# .Net)
create a paint event handler to draw a rectangle around its edges. I define
a Rectangle as follows:
Rectangle r = new Rectangle(0,0,200,200);
I then draw it in my event handler as follows:
dc = e.Graphics;
dc.DrawRectangle(mypen,r);
BUT the right and bottom edges are clipped! I would expect that since my
blank user control has the same size it should fit perfectly in side. If I
define my rectangle as
Rectangle r = new Rectangle(0,0,199,199);
then all is well. Do I interpret this to mean that height and width for the
rectangle refer to the white space inside and not its border. Any comments
are appreciated.
- Fred using VS2003 (C# .Net)