summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qoutlinemapper.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-08-09 18:16:27 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2010-08-16 06:13:32 (GMT)
commit69fc9e594e6d5da87bff42707973683f84b67c93 (patch)
treea37b98ad5c3014bc8671af0bf0153df609367ae8 /src/gui/painting/qoutlinemapper.cpp
parent1efed3f163164a9c98b4ea7d747507b6fdc52d63 (diff)
downloadQt-69fc9e594e6d5da87bff42707973683f84b67c93.zip
Qt-69fc9e594e6d5da87bff42707973683f84b67c93.tar.gz
Qt-69fc9e594e6d5da87bff42707973683f84b67c93.tar.bz2
Fix how subpixel positions are intepreted in an aliased grid.
With this change we break with the traditional X11 and GDI way of rasterzing aliased polygons, but we become consistent across integer and sub-pixel positions. The new model uses the same rules as the antialised rasterizer which means that a primitive edge on 0.4 becomes 0.0, 0.5 becomes 1 and 0.9 becomes one, which is also in line with how one normally thinks of rounding rules.
Diffstat (limited to 'src/gui/painting/qoutlinemapper.cpp')
-rw-r--r--src/gui/painting/qoutlinemapper.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp
index bf03545..72e5833 100644
--- a/src/gui/painting/qoutlinemapper.cpp
+++ b/src/gui/painting/qoutlinemapper.cpp
@@ -47,8 +47,6 @@
QT_BEGIN_NAMESPACE
-static const qreal aliasedCoordinateDelta = 0.5 - 0.015625;
-
#define qreal_to_fixed_26_6(f) (int(f * 64))
@@ -216,13 +214,6 @@ void QOutlineMapper::endOutline()
elements = m_elements_dev.data();
}
- if (m_round_coords) {
- // round coordinates to match outlines drawn with drawLine_midpoint_i
- for (int i = 0; i < m_elements.size(); ++i)
- elements[i] = QPointF(qFloor(elements[i].x() + aliasedCoordinateDelta),
- qFloor(elements[i].y() + aliasedCoordinateDelta));
- }
-
controlPointRect = boundingRect(elements, element_count);
#ifdef QT_DEBUG_CONVERT