public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Shapes();
Presentation pres = new Presentation(dataDir + "ConnectorLineAngle.pptx");
Slide slide = (Slide)pres.Slides[0];
Shape shape;
for (int i = 0; i < slide.Shapes.Count; i++)
{
double dir = 0.0;
shape = (Shape)slide.Shapes[i];
if (shape is AutoShape)
{
AutoShape ashp = (AutoShape)shape;
if (ashp.ShapeType == ShapeType.Line)
{
dir = getDirection(ashp.Width, ashp.Height, Convert.ToBoolean(ashp.Frame.FlipH), Convert.ToBoolean(ashp.Frame.FlipV));
}
}
else if (shape is Connector)
{
Connector ashp = (Connector)shape;
dir = getDirection(ashp.Width, ashp.Height, Convert.ToBoolean(ashp.Frame.FlipH), Convert.ToBoolean(ashp.Frame.FlipV));
}
Console.WriteLine(dir);
}
}
public static double getDirection(float w, float h, bool flipH, bool flipV)