diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-20 18:26:46 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-20 18:26:46 (GMT) |
commit | 4d344bbc7a780e861f83962a166e82a0648813f1 (patch) | |
tree | 8f6937de28c90cd7720a8e38e0312d6b8a138125 /src/declarative/graphicsitems/qdeclarativepainteditem.cpp | |
parent | 8678d9b5e70f6076e1e915d8bf3938136fe4018c (diff) | |
parent | 3ff96da38b0906a6b2e398aea3469b1ab3c72e2c (diff) | |
download | Qt-4d344bbc7a780e861f83962a166e82a0648813f1.zip Qt-4d344bbc7a780e861f83962a166e82a0648813f1.tar.gz Qt-4d344bbc7a780e861f83962a166e82a0648813f1.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Make Item::transformOriginPoint read-only
Ensure the boundingRect() of Text is correctly calculated.
Better defaults for MouseArea's drag.
various doc improvements for animation elements
fixes for dynamic object creation docs
Change docs to show how to define enum properties
Improve documentation on setting arbitray transform origin points
Ensure released VisualItemModel items are removed from the scene.
Improve QML text rendering when LCD smoothing is enabled for OS X.
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepainteditem.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepainteditem.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp index 3b9b8df..a6db1fa 100644 --- a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp +++ b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp @@ -90,6 +90,8 @@ QT_BEGIN_NAMESPACE static int inpaint=0; static int inpaint_clearcache=0; +extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled; + /*! Marks areas of the cache that intersect with the given \a rect as dirty and in need of being refreshed. @@ -287,7 +289,14 @@ void QDeclarativePaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem QRectF target(area.x(), area.y(), area.width(), area.height()); if (!d->cachefrozen) { if (!d->imagecache[i]->dirty.isNull() && topaint.contains(d->imagecache[i]->dirty)) { +#ifdef Q_WS_MAC + bool oldSmooth = qt_applefontsmoothing_enabled; + qt_applefontsmoothing_enabled = false; +#endif QPainter qp(&d->imagecache[i]->image); +#ifdef Q_WS_MAC + qt_applefontsmoothing_enabled = oldSmooth; +#endif qp.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, d->smoothCache); qp.translate(-area.x(), -area.y()); qp.scale(d->contentsScale,d->contentsScale); @@ -349,7 +358,14 @@ void QDeclarativePaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem if (d->fillColor.isValid()) img.fill(d->fillColor); { +#ifdef Q_WS_MAC + bool oldSmooth = qt_applefontsmoothing_enabled; + qt_applefontsmoothing_enabled = false; +#endif QPainter qp(&img); +#ifdef Q_WS_MAC + qt_applefontsmoothing_enabled = oldSmooth; +#endif qp.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, d->smoothCache); qp.translate(-r.x(),-r.y()); |