How to find out if two shape objects in PowerPoint intersect with each other?

193 Views Asked by At

There are multiple shapes present in a PowerPoint slide. See image below

enter image description here

As can be seen in the image, we have 3 shapes - rectangle, triangle and circle. I would like to iterate over the shapes in the slide and create a list of shapes for each shape with which it intersects. Shape intersection here refers to actual visual shape intersection and not the rectangular bounding box around those shapes.

List 1 - triangle, circle List 2 - circle, rectangle List 3 - rectangle, triangle

Is there any API to determine shape intersection? I have checked the PowerPoint add-in API, haven't found any. What approach should I follow?

1

There are 1 best solutions below

0
Eugene Astafiev On

There is no API to determine the shape intersection. You need to use Shape's properties to find out and intersection with others. A similar questions was posted some time ago, see List of objects in front of an object in PowerPoint using VSTO for more information.