开发者

AntiAlias failed when draw string with certain angle in GDI+

开发者 https://www.devze.com 2022-12-14 23:21 出处:网络
I am using the following code to draw Strings. In GDI+ Graphics tempFontGr(XXX); Matrix* myPathMatrix = NULL;

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(SmoothingModeAnt开发者_如何学CiAlias);
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!


SetSmoothingMode applies to lines and curves. Try SetTextRenderingHint

0

精彩评论

暂无评论...
验证码 换一张
取 消