• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
夜真寒
博客园    首页    新随笔    联系   管理    订阅  订阅

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.

posted @ 2011-11-05 12:41  夜真寒  阅读(1422)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3