Drawing a font with a different outline colour
Posted on 2005-05-12
Below is an example of the code I'm using to draw a font onto an existing gif image, which works fine:
Bitmap bmpImage = new Bitmap(@"C:\bg.gif");
Graphics image = Graphics.FromImage(bmpImage);
image.SmoothingMode = SmoothingMode.AntiAlias;
image.TextRenderingHint = TextRenderingHint.AntiAlias;
Font someText = new Font("Arial", 15, FontStyle.Bold);
image.DrawString("Test", someText, Brush.Black, new Point(2, 2));
However, I also want a two pixel thick outline around the font in a different colour. How can I achieve this?
Thanks in advance.