Commit fbd0e448 authored by Andy Shaw's avatar Andy Shaw
Browse files

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: default avatarLars Knoll <lars.knoll@theqtcompany.com>
parent 1840cc98
...@@ -146,8 +146,16 @@ void QAlphaPaintEngine::updateState(const QPaintEngineState &state) ...@@ -146,8 +146,16 @@ void QAlphaPaintEngine::updateState(const QPaintEngineState &state)
d->m_hasalpha = d->m_alphaOpacity || d->m_alphaBrush || d->m_alphaPen; 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); d->m_picengine->updateState(state);
}
} }
void QAlphaPaintEngine::drawPath(const QPainterPath &path) void QAlphaPaintEngine::drawPath(const QPainterPath &path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment