Hi
i need this function to write a script. i guess i saw it somewhere before(maybe i’m wrong) but i couldn’t find it.
First, get the complete path of the layer:
outline = Layer.completeBezierPath
This gets you a complete path of the layer, including components. You can then use any of the APIs from NSBezierPath, including containsPoint:
point = (50, 250)
if outline.containsPoint_(point):
# do something
4 Likes