diff options
Diffstat (limited to 'src/declarative/fx')
-rw-r--r-- | src/declarative/fx/qfxcomponentinstance.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxflickable_p.h | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfximage.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxitem.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxlayouts.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxpath.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxpathview_p.h | 1 | ||||
-rw-r--r-- | src/declarative/fx/qfxpixmap.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxtext.cpp | 27 | ||||
-rw-r--r-- | src/declarative/fx/qfxtext.h | 4 | ||||
-rw-r--r-- | src/declarative/fx/qfxtext_p.h | 3 | ||||
-rw-r--r-- | src/declarative/fx/qfxtextedit.cpp | 2 |
12 files changed, 40 insertions, 11 deletions
diff --git a/src/declarative/fx/qfxcomponentinstance.cpp b/src/declarative/fx/qfxcomponentinstance.cpp index d3f7061..7f592a9 100644 --- a/src/declarative/fx/qfxcomponentinstance.cpp +++ b/src/declarative/fx/qfxcomponentinstance.cpp @@ -41,7 +41,7 @@ #include "qfxcomponentinstance.h" #include "qfxcomponentinstance_p.h" -#include <qfxperf.h> +#include <private/qfxperf_p.h> #include <qfxcontentwrapper.h> #include <QtDeclarative/qmlinfo.h> diff --git a/src/declarative/fx/qfxflickable_p.h b/src/declarative/fx/qfxflickable_p.h index a3b1500..28ec6d8 100644 --- a/src/declarative/fx/qfxflickable_p.h +++ b/src/declarative/fx/qfxflickable_p.h @@ -57,7 +57,7 @@ #include "qfxflickable.h" #include "qfxitem_p.h" #include "qml.h" -#include "qmltimelinevalueproxy.h" +#include "private/qmltimeline_p.h" #include "private/qmlanimation_p.h" QT_BEGIN_NAMESPACE diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index 58d597a..539ad02 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -41,7 +41,7 @@ #include "qfximage.h" #include "qfximage_p.h" -#include <qfxperf.h> +#include <private/qfxperf_p.h> #if defined(QFX_RENDER_OPENGL) #include <glsave.h> #endif diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 7ccad5f..223af60 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -47,7 +47,7 @@ #include <QNetworkRequest> #include <QGraphicsSceneMouseEvent> #include <QtScript/qscriptengine.h> -#include <qfxperf.h> +#include <private/qfxperf_p.h> #include "qmlengine.h" #include "qmlstate.h" diff --git a/src/declarative/fx/qfxlayouts.cpp b/src/declarative/fx/qfxlayouts.cpp index af51318..20e7c7c 100644 --- a/src/declarative/fx/qfxlayouts.cpp +++ b/src/declarative/fx/qfxlayouts.cpp @@ -45,7 +45,7 @@ #include "qmlstate.h" #include "qmlstategroup.h" #include "qmlstateoperations.h" -#include "qfxperf.h" +#include "private/qfxperf_p.h" #include "qfxlayouts.h" #include "qfxlayouts_p.h" diff --git a/src/declarative/fx/qfxpath.cpp b/src/declarative/fx/qfxpath.cpp index be731b1..4c241d3 100644 --- a/src/declarative/fx/qfxpath.cpp +++ b/src/declarative/fx/qfxpath.cpp @@ -41,7 +41,7 @@ #include "qfxpath.h" #include "qfxpath_p.h" -#include <qfxperf.h> +#include <private/qfxperf_p.h> #include <private/qbezier_p.h> diff --git a/src/declarative/fx/qfxpathview_p.h b/src/declarative/fx/qfxpathview_p.h index b5c5ba2..b77c2a0 100644 --- a/src/declarative/fx/qfxpathview_p.h +++ b/src/declarative/fx/qfxpathview_p.h @@ -58,7 +58,6 @@ #include "qfxitem_p.h" #include "qfxvisualitemmodel.h" #include "qml.h" -#include "qmltimelinevalueproxy.h" #include "private/qmlanimation_p.h" QT_BEGIN_NAMESPACE diff --git a/src/declarative/fx/qfxpixmap.cpp b/src/declarative/fx/qfxpixmap.cpp index 0ea94f5..5ee6528 100644 --- a/src/declarative/fx/qfxpixmap.cpp +++ b/src/declarative/fx/qfxpixmap.cpp @@ -43,7 +43,7 @@ #include <QHash> #include <QNetworkReply> #include <QPixmapCache> -#include <qfxperf.h> +#include <private/qfxperf_p.h> #include <QtDeclarative/qmlengine.h> #include <QFile> diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp index 9550af9..f2519dc 100644 --- a/src/declarative/fx/qfxtext.cpp +++ b/src/declarative/fx/qfxtext.cpp @@ -48,7 +48,7 @@ #include "glbasicshaders.h" #endif -#include <qfxperf.h> +#include <private/qfxperf_p.h> #include <QTextLayout> #include <QTextLine> #include <QTextDocument> @@ -701,6 +701,21 @@ void QFxTextPrivate::checkImgCache() imgDirty = false; } +bool QFxText::smoothTransform() const +{ + Q_D(const QFxText); + return d->smooth; +} + +void QFxText::setSmoothTransform(bool s) +{ + Q_D(QFxText); + if (d->smooth == s) + return; + d->smooth = s; + update(); +} + #if defined(QFX_RENDER_QPAINTER) void QFxText::paintContents(QPainter &p) { @@ -709,6 +724,11 @@ void QFxText::paintContents(QPainter &p) if (d->imgCache.isNull()) return; + bool oldAA = p.testRenderHint(QPainter::Antialiasing); + bool oldSmooth = p.testRenderHint(QPainter::SmoothPixmapTransform); + if (d->smooth) + p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth); + int w = width(); int h = height(); @@ -749,6 +769,11 @@ void QFxText::paintContents(QPainter &p) p.drawPixmap(x, y, d->imgCache); if (needClip) p.restore(); + + if (d->smooth) { + p.setRenderHint(QPainter::Antialiasing, oldAA); + p.setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth); + } } #elif defined(QFX_RENDER_OPENGL2) diff --git a/src/declarative/fx/qfxtext.h b/src/declarative/fx/qfxtext.h index 1f5a7b8..104d18c 100644 --- a/src/declarative/fx/qfxtext.h +++ b/src/declarative/fx/qfxtext.h @@ -69,6 +69,7 @@ class Q_DECLARATIVE_EXPORT QFxText : public QFxItem Q_PROPERTY(bool wrap READ wrap WRITE setWrap) Q_PROPERTY(Qt::TextElideMode elide READ elideMode WRITE setElideMode) Q_PROPERTY(QString activeLink READ activeLink) + Q_PROPERTY(bool smooth READ smoothTransform WRITE setSmoothTransform) public: QFxText(QFxItem *parent=0); @@ -113,6 +114,9 @@ public: QString activeLink() const; + bool smoothTransform() const; + void setSmoothTransform(bool); + virtual void dump(int depth); virtual QString propertyInfo() const; diff --git a/src/declarative/fx/qfxtext_p.h b/src/declarative/fx/qfxtext_p.h index dfaef63..c58705c 100644 --- a/src/declarative/fx/qfxtext_p.h +++ b/src/declarative/fx/qfxtext_p.h @@ -75,7 +75,7 @@ public: QFxTextPrivate() : _font(0), color((QRgb)0), style(QFxText::Normal), imgDirty(true), hAlign(QFxText::AlignLeft), vAlign(QFxText::AlignTop), elideMode(Qt::ElideNone), - dirty(false), wrap(false), richText(false), singleline(false), control(0), doc(0) + dirty(false), wrap(false), smooth(false), richText(false), singleline(false), control(0), doc(0) { } @@ -125,6 +125,7 @@ public: Qt::TextElideMode elideMode; bool dirty; bool wrap; + bool smooth; bool richText; bool singleline; QTextControl *control; diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index 03dd63f..7f08fba 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -48,7 +48,7 @@ #include "glbasicshaders.h" #endif -#include <qfxperf.h> +#include <private/qfxperf_p.h> #include "qfxevents_p.h" #include <QTextLayout> #include <QTextLine> |