mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Refactoring - using of CMS
This commit is contained in:
@ -30,11 +30,13 @@ namespace pdf
|
||||
|
||||
PDFRenderer::PDFRenderer(const PDFDocument* document,
|
||||
const PDFFontCache* fontCache,
|
||||
const PDFCMS* cms,
|
||||
const PDFOptionalContentActivity* optionalContentActivity,
|
||||
Features features,
|
||||
const PDFMeshQualitySettings& meshQualitySettings) :
|
||||
m_document(document),
|
||||
m_fontCache(fontCache),
|
||||
m_cms(cms),
|
||||
m_optionalContentActivity(optionalContentActivity),
|
||||
m_features(features),
|
||||
m_meshQualitySettings(meshQualitySettings)
|
||||
@ -104,7 +106,7 @@ QList<PDFRenderError> PDFRenderer::render(QPainter* painter, const QRectF& recta
|
||||
|
||||
QMatrix matrix = createPagePointToDevicePointMatrix(page, rectangle);
|
||||
|
||||
PDFPainter processor(painter, m_features, matrix, page, m_document, m_fontCache, m_optionalContentActivity, m_meshQualitySettings);
|
||||
PDFPainter processor(painter, m_features, matrix, page, m_document, m_fontCache, m_cms, m_optionalContentActivity, m_meshQualitySettings);
|
||||
return processor.processContents();
|
||||
}
|
||||
|
||||
@ -120,7 +122,7 @@ QList<PDFRenderError> PDFRenderer::render(QPainter* painter, const QMatrix& matr
|
||||
const PDFPage* page = catalog->getPage(pageIndex);
|
||||
Q_ASSERT(page);
|
||||
|
||||
PDFPainter processor(painter, m_features, matrix, page, m_document, m_fontCache, m_optionalContentActivity, m_meshQualitySettings);
|
||||
PDFPainter processor(painter, m_features, matrix, page, m_document, m_fontCache, m_cms, m_optionalContentActivity, m_meshQualitySettings);
|
||||
return processor.processContents();
|
||||
}
|
||||
|
||||
@ -140,7 +142,7 @@ void PDFRenderer::compile(PDFPrecompiledPage* precompiledPage, size_t pageIndex)
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
|
||||
PDFPrecompiledPageGenerator generator(precompiledPage, m_features, page, m_document, m_fontCache, m_optionalContentActivity, m_meshQualitySettings);
|
||||
PDFPrecompiledPageGenerator generator(precompiledPage, m_features, page, m_document, m_fontCache, m_cms, m_optionalContentActivity, m_meshQualitySettings);
|
||||
QList<PDFRenderError> errors = generator.processContents();
|
||||
precompiledPage->optimize();
|
||||
precompiledPage->finalize(timer.nsecsElapsed(), qMove(errors));
|
||||
|
Reference in New Issue
Block a user