Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Gdiplus::Graphics::DrawText not blending properly

9 views
Skip to first unread message

Matt Houser

unread,
Feb 4, 2010, 2:04:17 PM2/4/10
to
If I have a bitmap which is all empty (alpha == 0), when I use g.DrawText()
to draw text on it, the text is not blending properly.

My brush has an alpha of 128. So I expect the final text to have an alpha
of 128 with antialiased pixels having an alpha < 128. Instead, it's ending
up with an alpha of 255 and any antialiased pixels also have an alpha of
255.

If the pixels below the text are alpha == 255, then alpha blending of the
text is ok and I end up with alpha == 128.

Is there something I am missing?

...Matt

--
Matt Houser
http://www.insidercoding.com

Matt Houser

unread,
Feb 4, 2010, 2:19:24 PM2/4/10
to
Solved.

Had to SetTextRenderingHint to AntiAlias.

...Matt

"Matt Houser" <ma...@houser.ca> wrote in message
news:AEFA853F-1DBF-4FD1...@microsoft.com...

0 new messages