Hello
I used the following code to draw a rectangle inside another rectangle (2
pixels smaller).
The inside rectangle results 1 pixel larger than the needed rectangle.
I had the same result with DrawPath when I was triyng to draw a
Rounded-Corners rectangle.
This is driving me crazy.
What's wrong?
Thank you
Dim rect1 As Rectangle
Dim insideRect As Rectangle
Dim pen As Pen
rect1 = New Rectangle(50, 50, 50, 50)
e.Graphics.FillRectangle(New SolidBrush(Color.Pink), rect1)
insideRect = New Rectangle(rect1.X + 2, rect1.Y + 2, rect1.Width - 4,
rect1.Height - 4)
pen = New Pen(Color.Blue)
pen.Alignment = PenAlignment.Inset
e.Graphics.DrawRectangle(pen, insideRect)
jokiz - 02 Dec 2005 09:25 GMT
try the dotnet.drawing groups