Graphics: Linier, der er antialiased bliver "hakkede"
HejJeg har et problem med at lige linier, der bliver tegnet med System.Drawing.Graphics bliver "hakkede" i antialias'ingen. Eksempel her: http://www.dotcomic.net/GraphicsPath.aspx
Dette er koden:
Bitmap oBitmap = new Bitmap(350, 250);
Graphics oGraphics = Graphics.FromImage(oBitmap);
oGraphics.SmoothingMode = SmoothingMode.AntiAlias;
Brush oBrush = new Pen(Color.White).Brush;
oGraphics.FillRectangle(oBrush, 0, 0, oBitmap.Width, oBitmap.Height);
GraphicsPath oGraphicsPath = new GraphicsPath();
oGraphicsPath.AddLine(new Point(20, 100), new Point(300, 100));
Pen oPen = new Pen(Color.Black, 2.0f);
oGraphics.DrawPath(oPen, oGraphicsPath);
oBitmap.Save(Response.OutputStream, ImageFormat.Gif);
Jeg har også prøvet de andre SmoothingModes men de giver samme resultat (bortset fra SmoothingMode.None, men jeg skal bruge antialiasing)
