Is there a way to know the direction of triangle shape if its upward or downward in the slide?
Thank you for posting the question.
To make sure I understand the question correctly, could you please share a presentation with the shapes demonstrating the issue?
@Andrey_Potapov There is no issue. I just wanted to check if we can get to know the direction of the triangle shape in the slide. If it the direction of the triangle shape is up or down in the slide. I am working with the rotation property but rotation angle will be 0 irrespective of the shape direction initially. I want to check if the triangle shape is pointing up or down and then change the angle according to the direction.
To know the direction of a triangle shape, you can analyze its geometry points. The following code example shows you how to get points of a simple triangle shape:
// It shoud be a triangle shape. var autoShape = (IAutoShape) presentation.Slides.Shapes; var pathData = autoShape.GetGeometryPaths().PathData; var point1 = new PointF(pathData.SegmentData, pathData.SegmentData); var point2 = new PointF(pathData.SegmentData, pathData.SegmentData); var point3 = new PointF(pathData.SegmentData, pathData.SegmentData);
@Andrey_Potapov Thank you, let me try to work with this information.
We will be glad if that way helps you.