Skip to main content

Метод TextBox::setGeometryProperties

Метод устанавливает геометрические свойства текстового поля GeometryProperties.

Пример для текстового документа:​


CO::API::Document::TextBoxes textBoxes = document.getRange().getTextBoxes();
std::shared_ptr<Enumerator<TextBox>> enumerator = textBoxes.getEnumerator();
while (enumerator->isValid())
{
TextBox textBox = enumerator->getCurrent();

GeometryProperties geometryProperties = textBox.getGeometryProperties();
geometryProperties.rotation = 45.0;
textBox.setGeometryProperties(shapeProperties);

enumerator->goToNext();
}

Пример для табличного документа:​


std::shared_ptr<Enumerator<TextBox>> enumerator = table.getTextBoxes().getEnumerator();
while (enumerator->isValid())
{
TextBox textBox = enumerator->getCurrent();

GeometryProperties geometryProperties = textBox.getGeometryProperties();
geometryProperties.rotation = 45.0;
textBox.setGeometryProperties(shapeProperties);

enumerator->goToNext();
}