summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJani Hautakangas <jani.hautakangas@lge.com>2013-12-12 21:48:35 +0200
committerDominik Holland <dominik.holland@qt.io>2020-07-07 11:50:09 +0200
commitd9cc1499954829faf9486fb72056e29f1bad58e3 (patch)
tree9586c5074380ce100ba447cf1bdfe9d796b8930e /src
parent7e2fded55e67727043c3dd0a1a5b3883655101c4 (diff)
Fix floating point clip rectangle rounding in raster and opengl paint engine
Fixes: QTBUG-83229 Pick-to: 5.15 Change-Id: If94028f27c9085e391acb9c423cde1b7c12bca36 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
-rw-r--r--src/opengl/qopenglpaintengine.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 5123171fff..b39d28e7b4 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -1251,7 +1251,7 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
#endif
const qreal *points = path.points();
QRectF r(points[0], points[1], points[4]-points[0], points[5]-points[1]);
- if (setClipRectInDeviceCoords(s->matrix.mapRect(r).toRect(), op))
+ if (setClipRectInDeviceCoords(s->matrix.mapRect(r).toAlignedRect(), op))
return;
}
}
diff --git a/src/opengl/qopenglpaintengine.cpp b/src/opengl/qopenglpaintengine.cpp
index 51d2a48682..a3f0a0ca02 100644
--- a/src/opengl/qopenglpaintengine.cpp
+++ b/src/opengl/qopenglpaintengine.cpp
@@ -2496,7 +2496,7 @@ void QOpenGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
&& qFuzzyIsNull(state()->matrix.m11())
&& qFuzzyIsNull(state()->matrix.m22())))
{
- state()->rectangleClip = state()->rectangleClip.intersected(state()->matrix.mapRect(rect).toRect());
+ state()->rectangleClip = state()->rectangleClip.intersected(state()->matrix.mapRect(rect).toAlignedRect());
d->updateClipScissorTest();
return;
}