Groups | Blog | Home
all groups > dotnet drawing api > january 2005 >

dotnet drawing api : Inverse text - with transparency!


Paul Wardle
1/21/2005 9:51:23 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

Bob Powell [MVP]
1/22/2005 2:07:13 AM
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/tipstricks.htm

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

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





[quoted text, click to view]

AddThis Social Bookmark Button