From b7a7959cebb9e4dc13cda0f0d23ff16a110c5838 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Wed, 24 Jun 2009 14:12:15 -0700 Subject: 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 --- src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 16 +++++++++++----- 1 file 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) -- cgit v0.12