摘要
从理论上说明了反走样现象的产生和解决办法,结合经典的DDA画线算法与Wu反走样算法,给出了一种任意线宽和复杂背景色下的直线反走样快速绘制算法:在x(y)轴上以一个像素单位的步长进行移动,而在直线的y(x)方向上根据直线的宽度,进行跨度像素填充,填充的色深值依赖于该像素到直线中心线的距离、原有背景色和当前直线绘制色。最后,对算法进行去浮点优化,给出了复杂度分析、实验结果及应用情况。
this paper theoretically analyzes anti-aliasing problem.A solution based on the classical DDA(Digital Differential analyzer) algorithm and Wu anti-aliasing algorithm is proposed to address the issue.The solution offers an efficient line drawing algorithm which is applicable to arbitrary line width and complex background color.Specifically the algorithm makes pixel by pixel step wise move along x(y) axis while filling span pixels along line direction of y(x) based on line width.The filling color is dependent...
出处
《软件导刊》
2010年第5期56-58,共3页
Software Guide