GDI函数SetPolyFillMode的效果
ALTERNATE WINDING
参数iMode:其有两种填充模式:ALTERNATE和WINDING;在默认情况下为ALTERNATE;
模式ALTERNATE:其从封闭区域中的一个点向无穷远处水平画一条射线,只有当该射线穿越奇数条边框线时,封闭区域才被填充,如为偶数,则不填充该区域;
模式WINDING:方法一样,如为奇数,填充该区域;如为偶数则要根据边框线的方向来判断:如果穿过的边框线在不同方向的边框线数目相等,则不填充,如不等,则填充。
一直看不明白,直到看见原版的,才知道翻译有问题:
at first, the difference between alternate and winding modes seems rather simple. for alternate mode, you can imagine a line drawn from a point in an enclosed area to infinity. the enclosed area is filled only if that imaginary line crosses an odd number of boundary lines. this is why the points of the star are filled but the center is not.