HIShapeCreateDifference equivalent in cocoa
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.
精彩评论