Closed gc-maximloverov closed 5 months ago
This is how GDI+ is working in these scenarios. This is not something that the WinForms team is able to impact. This is the design of GDI+ and would not be changing given how many applications are designed and working today. Any changes could be extremely breaking.
Ok.
.NET version
8.0
Did it work in .NET Framework?
No
Did it work in any of the earlier releases of .NET Core or .NET 5+?
No
Issue description
When I draw a line of thickness 1 using the Graphics.DrawLine method, then the length of the line becomes larger by 1. If I draw a line with a thickness greater than 1 along the same coordinates, then its length will be correct. Changing property Graphics.SmoothingMode to None does not affect the result. Also, methods Graphics.DrawPolygon and Graphics.DrawPath have the same issue.
Steps to reproduce