I am working on AI CC 2015 latest release.
I have a scenario where I need to check whether an art item or page item does not overflow the boundary of it's parent page item.
Is there any way to detect it?
The bounds won't work as they return bounds w.r.t a rectangle.
Please refer to the following images to understand better what I mean to say.
The above should return true as the rectangle is inside the pageItem.
The below scenarios should return false,
Any guidance, please?
- get the area of the pink rectangle,
- select both shapes,
- group them
- apply Transform->Intersect Effect
- expand appearance
analyse your results
- if the area of the rectangle changed, then it's partially inside the shirt
- if the area of the rectangle didn't change, it may be either completely outside or completely inside...if the shirt is gone, then your rectangle is completely inside.