summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qprintengine_win.cpp
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-18 15:04:46 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-18 15:07:04 (GMT)
commitf9f08de9d41fd55d9c7d01578191ef5d4099c9e6 (patch)
treee6167fa1475a201c887f46f3b0c411f3e92d645a /src/gui/painting/qprintengine_win.cpp
parent396eeb3f71c1c7edd861da1c8a8ec3086348502e (diff)
downloadQt-f9f08de9d41fd55d9c7d01578191ef5d4099c9e6.zip
Qt-f9f08de9d41fd55d9c7d01578191ef5d4099c9e6.tar.gz
Qt-f9f08de9d41fd55d9c7d01578191ef5d4099c9e6.tar.bz2
Use QTransform more efficiently.
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qprintengine_win.cpp')
-rw-r--r--src/gui/painting/qprintengine_win.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp
index 179927f..72faf7c 100644
--- a/src/gui/painting/qprintengine_win.cpp
+++ b/src/gui/painting/qprintengine_win.cpp
@@ -663,8 +663,7 @@ void QWin32PrintEngine::drawPixmap(const QRectF &targetRect,
qreal scaleX = 1.0f;
qreal scaleY = 1.0f;
- QTransform scaleMatrix;
- scaleMatrix.scale(r.width() / pixmap.width(), r.height() / pixmap.height());
+ QTransform scaleMatrix = QTransform::fromScale(r.width() / pixmap.width(), r.height() / pixmap.height());
QTransform adapted = QPixmap::trueMatrix(d->painterMatrix * scaleMatrix,
pixmap.width(), pixmap.height());
@@ -1875,8 +1874,7 @@ static void draw_text_item_win(const QPointF &_pos, const QTextItemInt &ti, HDC
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> _glyphs;
- QTransform matrix;
- matrix.translate(baseline_pos.x(), baseline_pos.y());
+ QTransform matrix = QTransform::fromTranslate(baseline_pos.x(), baseline_pos.y());
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags,
_glyphs, positions);
if (_glyphs.size() == 0) {