You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem may seem naive, I'm inserting a piece of text into an Excel sheet as a watermark by drawing it as an image, but I'd like to be able to set the image to semi-transparent. I googled it for a long time. But there doesn't seem to be a good solution.
And I've tried setting the transparency of the text, which doesn't work well either.
int opacity = 128; // 50% opaque (0 = invisible, 255 = fully opaque)
using (var graphics = Graphics.FromImage(image))
using (var font = new Font("Arial", 40))
using (var brush = new SolidBrush(Color.FromArgb(opacity, Color.Red)))
graphics.DrawString("This is a watermark", font, brush, 0, 0);
if anyone can kindly help me? Even if it makes it clear that there is no good solution it would be nice.
The text was updated successfully, but these errors were encountered:
The problem may seem naive, I'm inserting a piece of text into an Excel sheet as a watermark by drawing it as an image, but I'd like to be able to set the image to semi-transparent. I googled it for a long time. But there doesn't seem to be a good solution.
And I've tried setting the transparency of the text, which doesn't work well either.
if anyone can kindly help me? Even if it makes it clear that there is no good solution it would be nice.
The text was updated successfully, but these errors were encountered: