How to control anti aliasing of text?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to control anti aliasing of text?

Jaideep Singh
I need to control the anti-aliasing of the text drawn with help of wx.GCDC on a bitmap with alpha channel.
I have tried to disable SetAntialiasMode mode of Graphics context of wx.GCDC but it only disables the anti-aliasing of drawing not text.
Due to anti-aliasing of text, there is a black outline type effect around the text.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to control anti aliasing of text?

Chris Barker - NOAA Federal
You may not be able to do that, as it’s handled by the platform ( though there may be a way to pass a flag through...)

But anti-aliasing over a transparent background is often problematic— the renderers don’t seem to “get” that what you want is semi-transparent pixels ( which makes sense, it’s a whole different manipulation )

So renderers use the background color to anti-alias, which may not look right when put on a transparent background.

Do you have any control ( or information) over what color the text will ultimately be placed over? If you set the background color to the same or similar color that when rendering the text, it should look good.

Not always possible, but it can help.

-CHB

Sent from my iPhone

On Jan 10, 2018, at 10:08 PM, Jaideep Singh <[hidden email]> wrote:

I need to control the anti-aliasing of the text drawn with help of wx.GCDC on a bitmap with alpha channel.
I have tried to disable SetAntialiasMode mode of Graphics context of wx.GCDC but it only disables the anti-aliasing of drawing not text.
Due to anti-aliasing of text, there is a black outline type effect around the text.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to control anti aliasing of text?

Jaideep Singh
Sir,
Thank you for your reply.
No, i don't have control over the color which will be placed over. Since it's can't be done so I'll change the way text will be displayed for e.g. put a constant color background behind the text.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.