I'm using the following code to add text to a image:
private void AddText(Graphics graphics, FontDetails fontDetails, Rectangle destination)
{
using (GraphicsPath graphicsPath = new GraphicsPath())
{
graphicsPath.AddString(
"My sample text",
fontDetails.FontFamily,
fontDetails.FontStyle,
fontDetails.FontEmHeight,
destination,
fontDetails.FontStringFormat
);
graphics.FillPath(new SolidBrush(FontColour), graphicsPath);
}
}
This is working perfectly. I want to be able to apply an opacity effect to the text, but cannot seem to find an option to do this.
Any help would be greatly appreciated.