Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > System.Drawing For Drawing Text Images

Reply
Thread Tools

System.Drawing For Drawing Text Images

 
 
jjbutera@hotmail.com
Guest
Posts: n/a
 
      01-09-2006
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

 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      01-09-2006
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.

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide to the standard library? Library for drawing in GUIs?drawing inbrowsers? defn noob Java 1 06-28-2008 02:50 AM
funny drawing software:ScreenPen,drawing directly on screen! yyzzbb@sina.com Digital Photography 0 02-04-2006 12:31 AM
Drawing images over a JPanel Abs Java 7 10-07-2004 04:02 PM
How do I prevent multiple connections when drawing dynamic images? Ken Varn ASP .Net 3 06-11-2004 12:50 PM
problem system.drawing transparent web images eruess ASP .Net 0 08-08-2003 05:58 PM



Advertisments