关于WU_Line 反走样算法的
上网找到了一个反走样的算法,其中有一段看不懂,肯请高手解答,先谢了
算法地址:www.codeproject.com/KB/GDI/antialias.aspx
这一段看不懂,不知道是什么意思,希望高手解答
while (--DeltaX) {
ErrorAccTemp = ErrorAcc; /* remember currrent accumulated error */
ErrorAcc += ErrorAdj; /* calculate error for next pixel */
if (ErrorAcc <= ErrorAccTemp)
{
/* The error accumulator turned over, so advance the Y coord */
Y0++;
}
X0 += XDir; /* X-major, so always advance X */
/* The IntensityBits most significant bits of ErrorAcc give us the
intensity weighting for this pixel, and the complement of the
weighting for the paired pixel */