1
ashong 2014 年 12 月 3 日 via iPad
setClip
|
4
ashong 2014 年 12 月 3 日
@bitweaver
[[NSBezierPath bezierPathWithRect:NSMakeRect(x,y,w,h)] setClip]; or [NSBezierPath clipRect:NSMakeRect(x,y,w,h)]; |
5
ashong 2014 年 12 月 3 日 上面是设置rect为剪裁区域, 你的需求时掏洞, 应该是这样的
NSBezierPath* path = [NSBezierPath bezierPathWithRect: outerRect]; [path appendBezierPathWithRect: innerRect]; [path setWindingRule: NSEvenOddWindingRule]; [path setClip]; |