[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

nik

1/7/2005 2:46:00 PM

I would like to use the method DrawString(string,font,brush,x,y) to
draw a string. The string should be drawn with a certain font and
should also have a two pixel border around each letter.
My idea so far is to draw the string twice first in a large size and
then again in another color and a bit smaller. This doesn't work, since
the letters dont end up at the right positions because space between
letters are ofcause also resized.
Then I looked at the brush object. It might work if I could set the
size of the brush. But no luck here either.

Do you have any suggestions? Creating a border around a font is a
pretty standard thing in for instance photoshop. Is there an easy way
to achive this in the System.Drawing namespace?

Thanks. Nikolaj

1 Answer

Bob Powell

1/7/2005 5:28:00 PM

0

Read the GDI+ FAQ. See the article on text effects.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tips...

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/f...

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





<nik@email.dk> wrote in message
news:1105109160.484443.87300@f14g2000cwb.googlegroups.com...
>I would like to use the method DrawString(string,font,brush,x,y) to
> draw a string. The string should be drawn with a certain font and
> should also have a two pixel border around each letter.
> My idea so far is to draw the string twice first in a large size and
> then again in another color and a bit smaller. This doesn't work, since
> the letters dont end up at the right positions because space between
> letters are ofcause also resized.
> Then I looked at the brush object. It might work if I could set the
> size of the brush. But no luck here either.
>
> Do you have any suggestions? Creating a border around a font is a
> pretty standard thing in for instance photoshop. Is there an easy way
> to achive this in the System.Drawing namespace?
>
> Thanks. Nikolaj
>