summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-29 23:20:41 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-29 23:20:41 (GMT)
commit3f2be090858165d291f27a39157f76aab25d1aaa (patch)
tree6fe076c9daf7dd20da31ed0f85e96b1077a90134 /src/gui
parent91119eaa185934d568d0c83e25129b0028b5a607 (diff)
parentebbab30af417dfbf3df47dec15c0e2f8d6a30fa6 (diff)
downloadQt-3f2be090858165d291f27a39157f76aab25d1aaa.zip
Qt-3f2be090858165d291f27a39157f76aab25d1aaa.tar.gz
Qt-3f2be090858165d291f27a39157f76aab25d1aaa.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix the rendering of lines with the X11 paint engine Fix the byte order in QImage::fill for 24bpp formats QScript: remove JSC::JSLock QScript: document/obsolete things that does not work since the move to JSC
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp22
2 files changed, 11 insertions, 13 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 30cf758..52ba2b9 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2010,7 +2010,7 @@ void QImage::fill(uint pixel)
0, 0, d->width, d->height, d->bytes_per_line);
return;
} else if (d->depth == 24) {
- qt_rectfill<quint24>(reinterpret_cast<quint24*>(d->data), pixel,
+ qt_rectfill<qrgb888>(reinterpret_cast<qrgb888*>(d->data), pixel,
0, 0, d->width, d->height, d->bytes_per_line);
return;
}
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 910b2df..e521e01 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -696,11 +696,10 @@ void QX11PaintEngine::drawLines(const QLine *lines, int lineCount)
linef = d->matrix.map(QLineF(lines[i]));
}
if (clipLine(&linef, d->polygonClipper.boundingRect())) {
- int x1 = qRound(linef.x1() + aliasedCoordinateDelta);
- int y1 = qRound(linef.y1() + aliasedCoordinateDelta);
- int x2 = qRound(linef.x2() + aliasedCoordinateDelta);
- int y2 = qRound(linef.y2() + aliasedCoordinateDelta);
-
+ int x1 = qFloor(linef.x1() + aliasedCoordinateDelta);
+ int y1 = qFloor(linef.y1() + aliasedCoordinateDelta);
+ int x2 = qFloor(linef.x2() + aliasedCoordinateDelta);
+ int y2 = qFloor(linef.y2() + aliasedCoordinateDelta);
XDrawLine(d->dpy, d->hd, d->gc, x1, y1, x2, y2);
}
}
@@ -730,11 +729,10 @@ void QX11PaintEngine::drawLines(const QLineF *lines, int lineCount)
for (int i = 0; i < lineCount; ++i) {
QLineF linef = d->matrix.map(lines[i]);
if (clipLine(&linef, d->polygonClipper.boundingRect())) {
- int x1 = qRound(linef.x1() + aliasedCoordinateDelta);
- int y1 = qRound(linef.y1() + aliasedCoordinateDelta);
- int x2 = qRound(linef.x2() + aliasedCoordinateDelta);
- int y2 = qRound(linef.y2() + aliasedCoordinateDelta);
-
+ int x1 = qFloor(linef.x1() + aliasedCoordinateDelta);
+ int y1 = qFloor(linef.y1() + aliasedCoordinateDelta);
+ int x2 = qFloor(linef.x2() + aliasedCoordinateDelta);
+ int y2 = qFloor(linef.y2() + aliasedCoordinateDelta);
XDrawLine(d->dpy, d->hd, d->gc, x1, y1, x2, y2);
}
}
@@ -1690,8 +1688,8 @@ void QX11PaintEnginePrivate::strokePolygon_dev(const QPointF *polygonPoints, int
if (clippedCount > 0) {
QVarLengthArray<XPoint> xpoints(clippedCount);
for (int i = 0; i < clippedCount; ++i) {
- xpoints[i].x = qRound(clippedPoints[i].x + aliasedCoordinateDelta);
- xpoints[i].y = qRound(clippedPoints[i].y + aliasedCoordinateDelta);
+ xpoints[i].x = qFloor(clippedPoints[i].x + aliasedCoordinateDelta);
+ xpoints[i].y = qFloor(clippedPoints[i].y + aliasedCoordinateDelta);
}
uint numberPoints = qMin(clippedCount, xlibMaxLinePoints);
XPoint *pts = xpoints.data();