Text selection painter

This commit is contained in:
Jakub Melka
2020-01-08 19:02:29 +01:00
parent 7f55d11916
commit d3c0e418e7
5 changed files with 271 additions and 2 deletions

View File

@ -338,6 +338,22 @@ PDFTextLayout PDFAsynchronousTextLayoutCompiler::getTextLayout(PDFInteger pageIn
return PDFTextLayout();
}
PDFTextLayoutGetter PDFAsynchronousTextLayoutCompiler::getTextLayoutLazy(PDFInteger pageIndex)
{
if (m_state != State::Active || !m_proxy->getDocument())
{
// Engine is not active, always return empty layout
return PDFTextLayoutGetter(nullptr, pageIndex);
}
if (m_textLayouts)
{
return m_textLayouts->getTextLayoutLazy(pageIndex);
}
return PDFTextLayoutGetter(nullptr, pageIndex);
}
void PDFAsynchronousTextLayoutCompiler::makeTextLayout()
{
if (m_state != State::Active || !m_proxy->getDocument())