Parameters
- pen
- The pen that determines the color, width, and style of the line.
- x1
- The x-coordinate of the first point.
- y1
- The y-coordinate of the first point.
- x2
- The x-coordinate of the second point.
- y2
- The y-coordinate of the second point.
Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5