summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/fx/qfxtext.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp
index a43219d..bc3856d 100644
--- a/src/declarative/fx/qfxtext.cpp
+++ b/src/declarative/fx/qfxtext.cpp
@@ -749,7 +749,16 @@ void QFxText::paintContents(QPainter &p)
break;
}
+ bool needClip = !clip() && (d->imgCache.width() > width() ||
+ d->imgCache.height() > height());
+
+ if (needClip) {
+ p.save();
+ p.setClipRect(boundingRect());
+ }
p.drawImage(x, y, d->imgCache);
+ if (needClip)
+ p.restore();
}
#elif defined(QFX_RENDER_OPENGL2)