在 GDI+ 中绘制具有特定角度的字符串时,抗锯齿失败
我正在使用以下代码来绘制字符串。在 GDI+ 中,
Graphics tempFontGr(XXX);
Matrix* myPathMatrix = NULL;
myPathMatrix->Rotate(GetDCAngle(), MatrixOrderPrepend);
cantempFontGr.SetTransform(myPathMatrix);
tempFontGr.SetInterpolationMode(InterpolationModeHighQuality);
tempFontGr.SetSmoothingMode(SmoothingModeAntiAlias);
tempFontGr.DrawString(m_sWords, -1, tempFont.get(), tempRec, NULL, m_pBrush.get());
绘制的字符串有别名是很烦人的。有什么方法可以删除别名吗? 非常感谢!
I am using the following code to draw Strings. In GDI+
Graphics tempFontGr(XXX);
Matrix* myPathMatrix = NULL;
myPathMatrix->Rotate(GetDCAngle(), MatrixOrderPrepend);
cantempFontGr.SetTransform(myPathMatrix);
tempFontGr.SetInterpolationMode(InterpolationModeHighQuality);
tempFontGr.SetSmoothingMode(SmoothingModeAntiAlias);
tempFontGr.DrawString(m_sWords, -1, tempFont.get(), tempRec, NULL, m_pBrush.get());
It is anoying that the string drawn have alias. Is there any method to remove the alias?
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SetSmoothingMode
适用于直线和曲线。尝试SetTextRenderingHint
SetSmoothingMode
applies to lines and curves. TrySetTextRenderingHint