How can I use DrawString to annotate an image with text that has an outline/border?
@bpm-1, please see example:
using(var ms = new MemoryStream())
using (var image = Image.Create(new BmpOptions(){Source = new StreamSource(ms)}, 200, 100))
{
var g = new Graphics(image);
var p = new GraphicsPath();
var f = new Figure();
var shape = new TextShape("Hello world", new RectangleF(20, 0, 200, 100), new Font("Arial", 32), StringFormat.GenericDefault);
f.AddShape(shape);
p.AddFigure(f);
g.FillPath(new SolidBrush(Color.White), p);
g.DrawPath(new Pen(Color.Red), p);
image.Save(@"D:\1.bmp");
}