在倾斜实线的边界处平滑锯齿状边缘 [英] Smooth the jagged edge at the boundary of tilted solid line

查看:138
本文介绍了在倾斜实线的边界处平滑锯齿状边缘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我用笔绘制实线倾斜(30度) )我看到
边界有锯齿状边缘。 


有没有办法平滑边界处的锯齿状边缘?


我的典型代码包含以下元素



   hPen = CreatePen( PS_SOLID
宽度 ,icol);


    MoveToEx(hdc,xx1,yy1,
NULL );


   LineTo(hdc,xx2,yy2);




使用Visual Studio 2013,Windows 7平台和


我主要使用C语言


< p style ="background:white; margin-bottom:12pt"> 谢谢你,


ChangChiThe Graphics




chang Chi

解决方案

也许使用GDI +和尝试抗锯齿:
https://msdn.microsoft.com/ EN-US /库/ ms536351(v = vs.85)的.aspx
。您将不得不切换到C ++,或尝试使用有限的Flat API( https://msdn.microsoft.com/en-us/library/ms533969(v=vs.85).aspx )。


Hi,

I use pen to draw a solid line tilted( 30 degrees) and I see the boundary has jagged edges. 

Is there a way to smooth the jagged edge at the boundary ?

My typical code has following elements

   hPen = CreatePen(PS_SOLID, width, icol);

   MoveToEx(hdc, xx1, yy1, NULL);

   LineTo(hdc, xx2, yy2);

I use Visual Studio 2013, Windows 7 platform, and

I use C language mostly

Thank you,

ChangChiThe Graphics


chang Chi

解决方案

Maybe use GDI+ and try Antialiasing: https://msdn.microsoft.com/en-us/library/ms536351(v=vs.85).aspx. You will have to switch to C++, or try Flat API, which is limited (https://msdn.microsoft.com/en-us/library/ms533969(v=vs.85).aspx).


这篇关于在倾斜实线的边界处平滑锯齿状边缘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆