Hi,
WxDc draw circle, the edge of this circle is serrated, what can I do to eliminate the sawtooth?
how to How to improve the effect of wxDc drawing circle
how to How to improve the effect of wxDc drawing circle
Thanks
Best Regards
Ellan
Best Regards
Ellan
Re: how to How to improve the effect of wxDc drawing circle
Assuming you're under Windows, you'll need to use wxGraphicsContext, it supports anti-aliasing:
http://docs.wxwidgets.org/trunk/classwx ... ntext.html
If you already have a lot of code based on wxDC, you can use wxGCDC which is a wrapper around wxGraphicsContext with a wxDC-compatible API:
http://docs.wxwidgets.org/trunk/classwx_g_c_d_c.html
http://docs.wxwidgets.org/trunk/classwx ... ntext.html
If you already have a lot of code based on wxDC, you can use wxGCDC which is a wrapper around wxGraphicsContext with a wxDC-compatible API:
http://docs.wxwidgets.org/trunk/classwx_g_c_d_c.html
Use the source, Luke!
Re: how to How to improve the effect of wxDc drawing circle
the wxGraphicsContext drawing line works very well, but drawBitmap is the same as the sawtooth effect of wxDcdoublemax wrote:Assuming you're under Windows, you'll need to use wxGraphicsContext, it supports anti-aliasing:
http://docs.wxwidgets.org/trunk/classwx ... ntext.html
If you already have a lot of code based on wxDC, you can use wxGCDC which is a wrapper around wxGraphicsContext with a wxDC-compatible API:
http://docs.wxwidgets.org/trunk/classwx_g_c_d_c.html
Thanks
Best Regards
Ellan
Best Regards
Ellan
Re: how to How to improve the effect of wxDc drawing circle
Do you scale the bitmap? How?the wxGraphicsContext drawing line works very well, but drawBitmap is the same as the sawtooth effect of wxDc
Experiment with wxGraphicsContext::SetInterpolationQuality()
http://docs.wxwidgets.org/trunk/classwx ... c285d01b91
Use the source, Luke!
Re: how to How to improve the effect of wxDc drawing circle
It shows the original image, not zoomingdoublemax wrote:Do you scale the bitmap? How?the wxGraphicsContext drawing line works very well, but drawBitmap is the same as the sawtooth effect of wxDc
Experiment with wxGraphicsContext::SetInterpolationQuality()
http://docs.wxwidgets.org/trunk/classwx ... c285d01b91
Thanks
Best Regards
Ellan
Best Regards
Ellan
Re: how to How to improve the effect of wxDc drawing circle
Then the result is expected. If the image is pixelated before, wxGraphicsContect won't "fix" it.It shows the original image, not zooming
Can you show a screenshot?
Use the source, Luke!
Re: how to How to improve the effect of wxDc drawing circle
The effect of the wxDc and wxGc is that, like the ICONS in the attachment, it looks like the sawtooth is obvious.doublemax wrote:Then the result is expected. If the image is pixelated before, wxGraphicsContect won't "fix" it.It shows the original image, not zooming
Can you show a screenshot?
- Attachments
-
- 微信截图_20170830183803.png (3.34 KiB) Viewed 2274 times
Thanks
Best Regards
Ellan
Best Regards
Ellan
Re: how to How to improve the effect of wxDc drawing circle
It's hard for me to tell what's graphic and what's text. The only thing that looks a little strange is the paperclip. Everything else looks normal to me.
Use the source, Luke!