[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.drawing

Inverse text - with transparency!

Paul Wardle

1/21/2005 9:51:00 PM

Is there anyway to draw transparent text on an black rectangle (without
using a temporary bitmap) in GDI Plus?

This should leave etched out letters in a black area through which I can see
the background.

Any ideas?

Paul Wardle


1 Answer

Bob Powell

1/22/2005 1:07:00 AM

0

Use a GraphicsPath object with a rectangle the same size as the area you
wish to cover and the text inside. This will create an area that has text
shaped holes in it.

--
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.





"Paul Wardle" <p.wardle@ntlworld.com> wrote in message
news:%23KjiLNAAFHA.2112@TK2MSFTNGP14.phx.gbl...
> Is there anyway to draw transparent text on an black rectangle (without
> using a temporary bitmap) in GDI Plus?
>
> This should leave etched out letters in a black area through which I can
> see the background.
>
> Any ideas?
>
> Paul Wardle
>