Skip to main content

Метод Images::getEnumerator

Метод позволяет перечислить коллекцию изображений.

Пример​


CO::API::Document::Images images = document.getRange().getImages();
std::shared_ptr<Enumerator<Image>> enumerator = images.getEnumerator();
while (enumerator->isValid())
{
Image image = enumerator->getCurrent();
Frame frame = image.getFrame();

boost::optional < CO::API::Size<float>> dimensionsOpt = frame.getDimensions();
if (dimensionsOpt.has_value())
{
Size<float> size = dimensionsOpt.get();
std::printf("%f", size.width);
}
enumerator->goToNext();
}