summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@theqtcompany.com>2015-08-28 10:34:43 +0200
committerAndy Shaw <andy.shaw@theqtcompany.com>2015-09-03 13:00:15 +0000
commitfbd0e4489c936394a55f8084af2aab4ef2456360 (patch)
tree63751975f52338639334f9cc73deebec5f8e75f5 /src/printsupport/kernel
parent1840cc982a3a8882728b586f8924c74a7b79767f (diff)
Copy the state to the picture paintengine when updating the state
When the state of the paint changes then the one used for the picture paintengine needs to be kept in sync. Otherwise the rendering will be incorrect. Task-number: QTBUG-43145 Change-Id: Ia55a4e940d109bedb7c2eff4d985d3b212da75a4 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/printsupport/kernel')
-rw-r--r--src/printsupport/kernel/qpaintengine_alpha.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/printsupport/kernel/qpaintengine_alpha.cpp b/src/printsupport/kernel/qpaintengine_alpha.cpp
index 010a628e4f..a81f3eae43 100644
--- a/src/printsupport/kernel/qpaintengine_alpha.cpp
+++ b/src/printsupport/kernel/qpaintengine_alpha.cpp
@@ -146,8 +146,16 @@ void QAlphaPaintEngine::updateState(const QPaintEngineState &state)
d->m_hasalpha = d->m_alphaOpacity || d->m_alphaBrush || d->m_alphaPen;
- if (d->m_picengine)
+ if (d->m_picengine) {
+ const QPainter *p = painter();
+ d->m_picpainter->setPen(p->pen());
+ d->m_picpainter->setBrush(p->brush());
+ d->m_picpainter->setBrushOrigin(p->brushOrigin());
+ d->m_picpainter->setFont(p->font());
+ d->m_picpainter->setOpacity(p->opacity());
+ d->m_picpainter->setTransform(p->combinedTransform());
d->m_picengine->updateState(state);
+ }
}
void QAlphaPaintEngine::drawPath(const QPainterPath &path)