Is there a way to know the direction of triangle shape if its upward or downward in the slide?
@alikhanwtw,
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.
@alikhanwtw,
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[0].Shapes[0];
var pathData = autoShape.GetGeometryPaths()[0].PathData;
var point1 = new PointF(pathData[0].SegmentData[0], pathData[0].SegmentData[1]);
var point2 = new PointF(pathData[1].SegmentData[0], pathData[1].SegmentData[1]);
var point3 = new PointF(pathData[2].SegmentData[0], pathData[2].SegmentData[1]);
More examples: Custom Shape
API Reference: IGeometryShape.GetGeometryPaths Method