mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #123: Final bugfixing
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
@@ -187,7 +187,8 @@ private:
|
||||
|
||||
enum class RendererEngine
|
||||
{
|
||||
Blend2D,
|
||||
Blend2D_MultiThread,
|
||||
Blend2D_SingleThread,
|
||||
QPainter,
|
||||
};
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user