I think I found the source of the problem: The GDI+ method AddCurve(..). If it is used for creating long straight lines the line is messed up. The line looks like it should when created by AddLine(..). Since lines in Paint.Net are AFAIK created as splines ( => AddCurve) by default the problem appears.
Maybe the following could solve the problem: New lines should be drawn using AddLine by default and only be transformed to splines (or to beziƩr curves) if one uses the hand to modify the line.
What do you think about this?
Btw, here is the C# code I used for testing this:
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace LineTest
{
class LineTest
{
public static void Main(string[] args)
{
Bitmap bmp = new Bitmap(610, 320);
DrawStuff(Graphics.FromImage(bmp));
bmp.Save("lines.bmp");
}
private static void DrawStuff(Graphics g)
{
GraphicsPath badPath = new GraphicsPath();
badPath.AddCurve(new Point[2] { new Point(0, 0), new Point(600, 300) });
GraphicsPath goodPath = new GraphicsPath();
goodPath.AddLine(0, 10, 600, 310);
g.DrawPath(new Pen(Color.Red, 1), badPath);
g.DrawPath(new Pen(Color.Green, 1), goodPath);
}
}
}