Issue #123: Final bugfixing

This commit is contained in:
Jakub Melka
2024-02-25 15:19:35 +01:00
parent 89cfd1dd1f
commit 03cbde9690
9 changed files with 20 additions and 15 deletions

View File

@@ -588,12 +588,11 @@ void PDFBLPaintEngine::drawPathImpl(const QPainterPath& path, bool enableStroke,
QPainterPath transformedStrokedPath = m_currentTransform.map(strokedPath);
QPainterPath finalTransformedStrokedPath = transformedStrokedPath.intersected(m_finalClipPath.value());
BLVarCore strokeStyle;
if (!finalTransformedStrokedPath.isEmpty() && m_blContext->getStrokeStyle(strokeStyle) == BL_SUCCESS)
if (!finalTransformedStrokedPath.isEmpty())
{
m_blContext->save();
m_blContext->resetMatrix();
m_blContext->setFillStyle(strokeStyle);
setBLBrush(m_blContext.value(), m_currentPen.brush());
m_blContext->fillPath(getBLPath(finalTransformedStrokedPath));
m_blContext->restore();
}

View File

@@ -187,7 +187,8 @@ private:
enum class RendererEngine
{
Blend2D,
Blend2D_MultiThread,
Blend2D_SingleThread,
QPainter,
};

View File

@@ -220,7 +220,7 @@ void PDFRenderer::compile(PDFPrecompiledPage* precompiledPage, size_t pageIndex)
PDFRasterizer::PDFRasterizer(QObject* parent) :
BaseClass(parent),
m_rendererEngine(RendererEngine::Blend2D)
m_rendererEngine(RendererEngine::Blend2D_SingleThread)
{
}
@@ -247,7 +247,8 @@ QImage PDFRasterizer::render(PDFInteger pageIndex,
QTransform matrix = PDFRenderer::createPagePointToDevicePointMatrix(page, QRect(QPoint(0, 0), size), extraRotation);
if (m_rendererEngine == RendererEngine::Blend2D)
if (m_rendererEngine == RendererEngine::Blend2D_MultiThread ||
m_rendererEngine == RendererEngine::Blend2D_SingleThread)
{
PDFBLPaintDevice blPaintDevice(image, false);