I am looking for a method of calculating the area enclosed by a custom shape (for example the example of union of 2 shapes below).
The area of a custom shape is difficult to calculate using shape properties I can query using AppleScript. The size attribute specifies the width/height of the entire bounding box, but does not specify any information regarding the notch. Thus I am having trouble coming up with the area for this shape using a script
If I manually enable “edit points” for a shape, the shape changes to “Bezier” and i can now query an attribute called point list using AppleScript. Since the point list defines the real shape of the polygon I can easily use it to calculate the enclosed area.
However, it is not guaranteed that all objects on my canvas are “Bezier”. With that in mind I have the following questions:
1. Is it possible to automate the process of making points editable using AppleScript? (i.e. not have to manually select the checkbox for each object)
2. Is there any other automated way of deriving a point list for a custom shape using AppleScript?
Thanks in advance for the help.