diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-04 09:50:23 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-04 09:50:23 (GMT) |
commit | 97c2332504a45eabec12517a123a65b41d9af9fb (patch) | |
tree | 82666e539eb93f9a671ed8f0a527260a07805bd5 /src/gui/painting | |
parent | 2ac3bffd816d9fbe9646b6126b4a882f391b466f (diff) | |
parent | 47b7af3bfd78c6d4efd3ce93be275a60430679d2 (diff) | |
download | Qt-97c2332504a45eabec12517a123a65b41d9af9fb.zip Qt-97c2332504a45eabec12517a123a65b41d9af9fb.tar.gz Qt-97c2332504a45eabec12517a123a65b41d9af9fb.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into qstatictext-4.6
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 9 | ||||
-rw-r--r-- | src/gui/painting/qpathclipper.cpp | 6 | ||||
-rw-r--r-- | src/gui/painting/qpathclipper_p.h | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 29694d1..a2e14e1 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3077,6 +3077,8 @@ void QRasterPaintEngine::drawGlyphsS60(const QPointF &p, const QTextItemInt &ti) QVarLengthArray<glyph_t> glyphs; QTransform matrix = s->matrix; matrix.translate(p.x(), p.y()); + if (matrix.type() == QTransform::TxScale) + fe->setFontScale(matrix.m11()); ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions); const QFixed aliasDelta = QFixed::fromReal(aliasedCoordinateDelta); @@ -3093,6 +3095,9 @@ void QRasterPaintEngine::drawGlyphsS60(const QPointF &p, const QTextItemInt &ti) alphaPenBlt(glyphBitmapBytes, glyphBitmapSize.iWidth, 8, x, y, glyphBitmapSize.iWidth, glyphBitmapSize.iHeight); } + if (matrix.type() == QTransform::TxScale) + fe->setFontScale(1.0); + return; } #endif // Q_OS_SYMBIAN && QT_NO_FREETYPE @@ -3284,7 +3289,9 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte } #elif defined (Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE) // Q_WS_WIN || Q_WS_MAC - if (s->matrix.type() <= QTransform::TxTranslate) { + if (s->matrix.type() <= QTransform::TxTranslate + || (s->matrix.type() == QTransform::TxScale + && (qFuzzyCompare(s->matrix.m11(), s->matrix.m22())))) { drawGlyphsS60(p, ti); return; } diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp index 7997e77..bc81514 100644 --- a/src/gui/painting/qpathclipper.cpp +++ b/src/gui/painting/qpathclipper.cpp @@ -90,8 +90,6 @@ static QPointF normalize(const QPointF &p) return p / qSqrt(p.x() * p.x() + p.y() * p.y()); } -static bool pathToRect(const QPainterPath &path, QRectF *rect = 0); - struct QIntersection { qreal alphaA; @@ -1660,7 +1658,7 @@ static bool fuzzyCompare(qreal a, qreal b) return qFuzzyCompare(a, b); } -static bool pathToRect(const QPainterPath &path, QRectF *rect) +bool QPathClipper::pathToRect(const QPainterPath &path, QRectF *rect) { if (path.elementCount() != 5) return false; @@ -1693,7 +1691,7 @@ static bool pathToRect(const QPainterPath &path, QRectF *rect) return false; if (rect) - *rect = QRectF(QPointF(x1, y1), QPointF(x2, y2)); + rect->setCoords(x1, y1, x2, y2); return true; } diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h index 0d2c049..b900862 100644 --- a/src/gui/painting/qpathclipper_p.h +++ b/src/gui/painting/qpathclipper_p.h @@ -86,6 +86,8 @@ public: bool intersect(); bool contains(); + static bool pathToRect(const QPainterPath &path, QRectF *rect = 0); + private: Q_DISABLE_COPY(QPathClipper) |