System.Drawing For Drawing Text Images

J

jjbutera

There are a lot of examples out there, but I was hoping something could
help me further. I'd like to draw text (unknown length) to an image,
but then crop the image to the height and width of the text. Is this
possible?

I'm guessing I can get the height from the Font.Height property. But
how do I go about getting the width of the drawn text?

Also, are there any tip for drawing fairly smooth fonts?

Thanks,

Jason
 
K

Kevin Spencer

Check out the Graphics.MeasureString() method for measuring your text.
And for smoothing, check out the Graphics.SmoothingMode property.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top