1

i'm making a web app which writes text on a series of images.Now the text must be highlighted Yellow. I'm using DrawString , but with it i cannot make this operation. My code is:

g.DrawString( text...", fontSize, fontColor, 200, 320, textAlign);

How can i make this text highlighted?

Thanks

1 Answers1

0
var sz = g.MeasureString(text, fontSize);
g.FillRectangle(Brushes.Yellow, new Rectangle(200,320,sz.Width, sz.Height);
g.DrawString( text...", fontSize, fontColor, 200, 320, textAlign);
Dan Byström
  • 9,067
  • 5
  • 38
  • 68