There is a code:
Pen pen1 = new Pen(Color.Black, 8); Bitmap bb = new Bitmap(100, 100); Graphics g = Graphics.FromImage(bb); g.DrawPolygon(pen1, new PointF[]{ new PointF(0,0), new PointF(100, 0), new PointF(100,100), new PointF(0, 100), new PointF(0, 0) }); bb.Save("test1.bmp"); So, in test1.bmp, I expect to see an image with an inscribed rectangle, whose face width will be == pen1.Width, but the width of the face is usually equal to pen1.Width / 2. Why it happens? And how to set the correct drawing coordinates? Thank you in advance.
Alignmentparameter. - Alexander Petrov