开发者

HIShapeCreateDifference equivalent in cocoa

开发者 https://www.devze.com 2023-01-27 05:21 出处:网络
I tried searching but couldn\'t find a function w开发者_运维问答hich can create a shape by calculating difference of two NSBezier Paths or two CGPaths. Is there a function that can establish this in c

I tried searching but couldn't find a function w开发者_运维问答hich can create a shape by calculating difference of two NSBezier Paths or two CGPaths. Is there a function that can establish this in cocoa ?

Thanks.


See "Winding Rules" with NSBezierPath. You'll make a compound path by appending your two source paths to it. The resulting shape will depend upon the winding rule you set.


Finally did it by creating a bigger tracking area to enclose the whole shape and then tracking mouse moved events inside this tracking area.

0

精彩评论

暂无评论...
验证码 换一张
取 消