path: root/softwarecontext
diff options
authorSimon Hausmann <simon.hausmann@digia.com>2014-08-16 13:50:50 +0200
committerLars Knoll <lars.knoll@digia.com>2014-08-18 10:13:38 +0300
commit4cf478605e9d90d0bfaeec1f8e78cfdc71be402b (patch)
treeec33ecb7939bdac5ffd52a0953df98d056a52c6d /softwarecontext
parente117b9e7d5ad535ee6fed9a61a747290468665e0 (diff)
Fix text rendering
Since we don't save/restore the painter state for each node, we have to be careful that settings don't "leak" across paint calls. For example a rectangle node with a gradient will leave the painter with a brush set. A sub-sequent child text node will be rendered incorrectly. This patch corrects that by setting the brush explicitly to the empty brush. This fixes also the examples/quick/views rendering. Change-Id: Ia1415b5fdf77a560b02719917d36298e808418f1 Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'softwarecontext')
1 files changed, 1 insertions, 0 deletions
diff --git a/softwarecontext/glyphnode.cpp b/softwarecontext/glyphnode.cpp
index 8099df03d9..eae8b626cb 100644
--- a/softwarecontext/glyphnode.cpp
+++ b/softwarecontext/glyphnode.cpp
@@ -64,6 +64,7 @@ void GlyphNode::update()
void GlyphNode::paint(QPainter *painter)
+ painter->setBrush(QBrush());
QPointF pos = m_position - QPointF(0, m_glyphRun.rawFont().ascent());
switch (m_style) {