Advanced snapping, basics of screenshot tool

This commit is contained in:
Jakub Melka
2020-02-28 18:56:28 +01:00
parent 46c267e537
commit 13bfbd7095
7 changed files with 212 additions and 3 deletions

View File

@ -1370,4 +1370,15 @@ void IDocumentDrawInterface::drawPostRendering(QPainter* painter, QRect rect) co
Q_UNUSED(rect);
}
const PDFWidgetSnapshot::SnapshotItem* PDFWidgetSnapshot::getPageSnapshot(PDFInteger pageIndex) const
{
auto it = std::find_if(items.cbegin(), items.cend(), [pageIndex](const auto& item) { return item.pageIndex == pageIndex; });
if (it != items.cend())
{
return &*it;
}
return nullptr;
}
} // namespace pdf