[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.drawing

Creating a Graphics Path from a String of Text

Edward Jones

10/13/2004 2:25:00 PM

Hi,

I have created a Graphics Path of text using the AddString method, which
I then use to draw text to the form using High Quality Smoothing
property. However, I would then like to use this path to create a
transparent form region to basically make the background transparent.
However, when I create the region it is ignoring the Smoothing mode
settings and the text it produces is of very poor quality. Is there a
way around this?

I currently have a working version of what I would like to do but it is
very slow on large forms as it is using a pixel by pixel loop to create
the graphics path.


Thanks for any help!

Ed Jones.
1 Answer

Bob Powell

10/14/2004 3:13:00 PM

0

A region defines it''s edges on pixel boundaries and so thare is no way to
have an antialiased region.

The smoothing mode of graphics and the rendering modes of text antialias by
mergeing the edge pixels with that of the background. The only way to do
what you want is to draw directly on the background.

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

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

The GDI+ FAQ RSS feed: http://www.bobpowell.net/f...
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tips...
Bob''s Blog: http://bobpowelldotnet.blogspot.co...






"Edward Jones" <edwardjones@dollshouseandtoyshop.co.uk> wrote in message
news:416d3ab7$0$59442$ed2619ec@ptn-nntp-reader03.plus.net...
> Hi,
>
> I have created a Graphics Path of text using the AddString method, which
> I then use to draw text to the form using High Quality Smoothing
> property. However, I would then like to use this path to create a
> transparent form region to basically make the background transparent.
> However, when I create the region it is ignoring the Smoothing mode
> settings and the text it produces is of very poor quality. Is there a
> way around this?
>
> I currently have a working version of what I would like to do but it is
> very slow on large forms as it is using a pixel by pixel loop to create
> the graphics path.
>
>
> Thanks for any help!
>
> Ed Jones.