Andrei

Andrei

  • NA
  • 3
  • 0

How to draw lines with AntiAlias on existing Images?

Sep 15 2009 3:50 AM
I have a bitmap like this: Background = new Bitmap(Image.FromFile(@"D:\ProjectZero\DomainModel\image\bkg1.PNG")); on which i draw a line like this Color color = Color.Green; int width = 5; Graphics drawing = Graphics.FromImage(Background); Pen lineXPen = new Pen(color, (float)width); drawing.DrawLine(lineXPen, Point1, Point2); How do I simply draw lines on images like Bitmaps, Png, Jpeg with Anti Aliasing ? I tried to use this method "SmoothingMode.AntiAlias " from System.Drawing.Drawing2D on the Graphics object but it didn't work.

Answers (1)