Метод TextBox.getGeometryProperties
Метод возвращает геометрические свойства текстового поля GeometryProperties.
Пример для текстового документа:
TextBoxes textBoxes = document.getRange().getTextBoxes();
TextBoxesEnumerator textBoxesEnumerator = textBoxes.getEnumerator();
foreach (var textBox in textBoxesEnumerator)
{
GeometryProperties geometryProperties = textBox.getGeometryProperties()
if (geometryProperties.rotation != null)
{
Console.WriteLine(geometryProperties.rotation);
}
if (geometryProperties.horizontalFlip)
{
Console.WriteLine(geometryProperties.horizontalFlip);
}
if (geometryProperties.verticalFlip)
{
Console.WriteLine(geometryProperties.verticalFlip);
}
}
Пример для табличного документа:
TextBoxes textBoxes = table.getTextBoxes();
TextBoxesEnumerator textBoxesEnumerator = textBoxes.getEnumerator();
foreach (var textBox in textBoxesEnumerator)
{
GeometryProperties geometryProperties = textBox.getGeometryProperties()
if (geometryProperties.rotation != null)
{
Console.WriteLine(geometryProperties.rotation);
}
if (geometryProperties.horizontalFlip)
{
Console.WriteLine(geometryProperties.horizontalFlip);
}
if (geometryProperties.verticalFlip)
{
Console.WriteLine(geometryProperties.verticalFlip);
}
}