summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-06-24 21:12:15 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-06-24 21:12:15 (GMT)
commitb7a7959cebb9e4dc13cda0f0d23ff16a110c5838 (patch)
treeade19bc25cdb70dd073ae6b6a4b2e821dd787365 /src/plugins
parent5f5cf5b798cc7e65e47987b654beaf9d762406eb (diff)
downloadQt-b7a7959cebb9e4dc13cda0f0d23ff16a110c5838.zip
Qt-b7a7959cebb9e4dc13cda0f0d23ff16a110c5838.tar.gz
Qt-b7a7959cebb9e4dc13cda0f0d23ff16a110c5838.tar.bz2
Make sure simplePen gets set properly
The logic regarding whether or not a pen was simple was broken. Essentially the pen is sonly simple if it should en up as a single pixel line. Reviewed-by: Donald <qt-info@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 3425d08..c77cd78 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -913,11 +913,17 @@ void QDirectFBPaintEnginePrivate::end()
void QDirectFBPaintEnginePrivate::setPen(const QPen &p)
{
pen = p;
- simplePen = (pen.style() == Qt::NoPen) ||
- (pen.style() == Qt::SolidLine
- && !antialiased
- && (pen.brush().style() == Qt::SolidPattern)
- && (pen.widthF() <= 1 && scale != NoScale));
+ if (pen.style() == Qt::NoPen) {
+ simplePen = true;
+ } else if (pen.style() == Qt::SolidLine
+ && !antialiased
+ && pen.brush().style() == Qt::SolidPattern
+ && pen.widthF() <= 1.0
+ && (scale == NoScale || pen.isCosmetic())) {
+ simplePen = true;
+ } else {
+ simplePen = false;
+ }
}
void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode mode)