Original Post
Does anyone know how you would do simple text annotation using "SharpDX" library (for C#)?
Here is how GDI+ does it currently in my app (in particular, the bold red lines are of interest):
using (Graphics g = Graphics.FromImage(bm))
using (SolidBrush solidWhiteBrush = new SolidBrush(Color.White))
using (SolidBrush solidBlackBrush = new SolidBrush(Color.Black))
{
// Write out annotation text
[color=#ff0000] g.FillRectangle(solidWhiteBrush, 0, 0, bm.Width, bm.Height);
[color=#ff0000] g.DrawString(AnnotationText, AnnotationFont, solidBlackBrush, new PointF(7f, 2f));
Thank you for sample code showing how this would be done using SharpDX!
Tom
Here is how GDI+ does it currently in my app (in particular, the bold red lines are of interest):
using (Graphics g = Graphics.FromImage(bm))
using (SolidBrush solidWhiteBrush = new SolidBrush(Color.White))
using (SolidBrush solidBlackBrush = new SolidBrush(Color.Black))
{
// Write out annotation text
[color=#ff0000] g.FillRectangle(solidWhiteBrush, 0, 0, bm.Width, bm.Height);
[color=#ff0000] g.DrawString(AnnotationText, AnnotationFont, solidBlackBrush, new PointF(7f, 2f));
Thank you for sample code showing how this would be done using SharpDX!
Tom