summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2010-08-17 08:45:17 (GMT)
committerJesper Thomschutz <jesper.thomschutz@nokia.com>2010-08-19 06:22:17 (GMT)
commit16a1d531adc69fd4473b44b9d326784f52917245 (patch)
treeec167cb180fc7a06b826031beff45ef9495c7343 /src/gui
parent8305a9e833003b9f5018f7ae0ad8d175b6361df8 (diff)
downloadQt-16a1d531adc69fd4473b44b9d326784f52917245.zip
Qt-16a1d531adc69fd4473b44b9d326784f52917245.tar.gz
Qt-16a1d531adc69fd4473b44b9d326784f52917245.tar.bz2
Outline / fill inconsistency in X11 paint engine.
Change ebbab30af417dfbf3df47dec15c0e2f8d6a30fa6 broke outline / fill consistency in the X11 engine. Since the positioning of lines is more important we'll round the fill coordinates the same way. The bug was visible in the filltest.qps arthur test. Reviewed-by: Gunnar Sletta (cherry picked from commit ff405f5623d7ed18c881c097368e3e9afd2e9443)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index e521e01..5307142 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -1516,8 +1516,8 @@ void QX11PaintEnginePrivate::fillPolygon_translated(const QPointF *polygonPoints
for (int i = 0; i < pointCount; ++i) {
translated_points[i] = polygonPoints[i] + offset;
- translated_points[i].rx() = qRound(translated_points[i].x()) + offs;
- translated_points[i].ry() = qRound(translated_points[i].y()) + offs;
+ translated_points[i].rx() = qFloor(translated_points[i].x()) + offs;
+ translated_points[i].ry() = qFloor(translated_points[i].y()) + offs;
}
fillPolygon_dev(translated_points.data(), pointCount, gcMode, mode);
@@ -1754,8 +1754,8 @@ void QX11PaintEnginePrivate::fillPath(const QPainterPath &path, QX11PaintEngineP
for (int j = 0; j < polys.at(i).size(); ++j) {
translated_points[j] = polys.at(i).at(j);
if (!X11->use_xrender || !(render_hints & QPainter::Antialiasing)) {
- translated_points[j].rx() = qRound(translated_points[j].rx() + aliasedCoordinateDelta) + offs;
- translated_points[j].ry() = qRound(translated_points[j].ry() + aliasedCoordinateDelta) + offs;
+ translated_points[j].rx() = qFloor(translated_points[j].rx() + aliasedCoordinateDelta) + offs;
+ translated_points[j].ry() = qFloor(translated_points[j].ry() + aliasedCoordinateDelta) + offs;
}
}