summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpaintengine_opengl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qpaintengine_opengl.cpp')
-rw-r--r--src/opengl/qpaintengine_opengl.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index b594f5b..e173a8d 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -4206,8 +4206,7 @@ void QOpenGLPaintEnginePrivate::drawImageAsPath(const QRectF &r, const QImage &i
qreal scaleX = r.width() / sr.width();
qreal scaleY = r.height() / sr.height();
- QTransform brush_matrix;
- brush_matrix.translate(r.left(), r.top());
+ QTransform brush_matrix = QTransform::fromTranslate(r.left(), r.top());
brush_matrix.scale(scaleX, scaleY);
brush_matrix.translate(-sr.left(), -sr.top());
@@ -4228,8 +4227,7 @@ void QOpenGLPaintEnginePrivate::drawTiledImageAsPath(const QRectF &r, const QIma
QBrush old_brush = cbrush;
QPointF old_brush_origin = brush_origin;
- QTransform brush_matrix;
- brush_matrix.translate(r.left(), r.top());
+ QTransform brush_matrix = QTransform::fromTranslate(r.left(), r.top());
brush_matrix.scale(sx, sy);
cbrush = QBrush(img);
@@ -4871,8 +4869,7 @@ void QOpenGLPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
// add the glyphs used to the glyph texture cache
QVarLengthArray<QFixedPoint> positions;
QVarLengthArray<glyph_t> glyphs;
- QTransform matrix;
- matrix.translate(qRound(p.x()), qRound(p.y()));
+ QTransform matrix = QTransform::fromTranslate(qRound(p.x()), qRound(p.y()));
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
// make sure the glyphs we want to draw are in the cache