Text layouts for every page

This commit is contained in:
Jakub Melka
2019-12-31 17:39:31 +01:00
parent c803317b6b
commit c832c4ecef
11 changed files with 509 additions and 125 deletions

View File

@ -626,7 +626,7 @@ void PDFDrawWidgetProxy::draw(QPainter* painter, QRect rect)
// Draw text blocks/text lines, if it is enabled
if (m_features.testFlag(PDFRenderer::DebugTextBlocks))
{
const PDFTextLayout& layout = compiledPage->getTextLayout();
PDFTextLayout layout = m_compiler->getTextLayout(item.pageIndex);
const PDFTextBlocks& textBlocks = layout.getTextBlocks();
painter->save();
@ -648,7 +648,7 @@ void PDFDrawWidgetProxy::draw(QPainter* painter, QRect rect)
}
if (m_features.testFlag(PDFRenderer::DebugTextLines))
{
const PDFTextLayout& layout = compiledPage->getTextLayout();
PDFTextLayout layout = m_compiler->getTextLayout(item.pageIndex);
const PDFTextBlocks& textBlocks = layout.getTextBlocks();
painter->save();