本文整理汇总了C++中SpatialDataView::getPanLimit方法的典型用法代码示例。如果您正苦于以下问题:C++ SpatialDataView::getPanLimit方法的具体用法?C++ SpatialDataView::getPanLimit怎么用?C++ SpatialDataView::getPanLimit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpatialDataView
的用法示例。
在下文中一共展示了SpatialDataView::getPanLimit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
//.........这里部分代码省略.........
mpStep->finalize(Message::Abort);
return false;
}
// generate the next frame
pController->setCurrentFrame(video_pts);
if (mpProgress != NULL)
{
double progressValue = (video_pts - startExport) / (stopExport - startExport) * 100.0;
mpProgress->updateProgress("Saving movie", static_cast<int>(progressValue), NORMAL);
}
if (fullResolution)
{
QSize totalSize(pCodecContext->width, pCodecContext->height);
QSize subImageSize(pView->getWidget()->width(), pView->getWidget()->height());
// Make sure that the sub-image and the main image have the same aspect ratio to
// minimize wasted tile space
if (pCodecContext->width > pCodecContext->height)
{
subImageSize.setWidth(
totalSize.width() / static_cast<float>(totalSize.height()) * subImageSize.height() + 0.5);
}
else
{
subImageSize.setHeight(
totalSize.height() / static_cast<float>(totalSize.width()) * subImageSize.width() + 0.5);
}
// Remove pan and zoom limits so they don't interfere with the subimage grab
// and restore them when done
SpatialDataView* pSdv = dynamic_cast<SpatialDataView*>(pView);
PanLimitType panLimit;
if (pSdv != NULL)
{
panLimit = pSdv->getPanLimit();
pSdv->setPanLimit(NO_LIMIT);
}
View::SubImageIterator* pSubImage(pView->getSubImageIterator(totalSize, subImageSize));
if (pSubImage == NULL)
{
if (pSdv != NULL)
{
pSdv->setPanLimit(panLimit);
}
if (mpProgress != NULL)
{
mpProgress->updateProgress("Unable to render full scale data", 0, ERRORS);
}
pController->setAnimationState(savedAnimationState);
mpStep->finalize(Message::Failure);
return false;
}
QPainter outPainter(&image);
QPoint origin(0, image.height() - subImageSize.height());
while (pSubImage->hasNext())
{
QImage subImage;
if (!pSubImage->next(subImage))
{
if (pSdv != NULL)
{
pSdv->setPanLimit(panLimit);
}
if (mpProgress != NULL)
{
mpProgress->updateProgress("An error occurred when generating the image", 0, ERRORS);
}