Portion
Contents
[
Hide
]
Get Position Coordinates of Portion
GetCoordinates() method has been added to IPortion and Portion class which allows retrieving the coordinates of the beginning of the portion:
using (Presentation presentation = new Presentation("Shapes.pptx"))
{
IAutoShape shape = (IAutoShape)presentation.Slides[0].Shapes[0];
var textFrame = (ITextFrame)shape.TextFrame;
foreach (var paragraph in textFrame.Paragraphs)
{
foreach (Portion portion in paragraph.Portions)
{
PointF point = portion.GetCoordinates();
Console.Write(Environment.NewLine + "Corrdinates X =" + point.X + " Corrdinates Y =" + point.Y);
}
}
}