Produce more correct clip path for QGraphicsShapeItem
If no pen is set on the item, we can completely ignore the pen for the creation of the items shape. This both speeds up the creation of the shape and applying it as a clip mask as well as creating more correct results. Task-number: QTBUG-32846 Change-Id: I5f6f690256c71309713d8f746e67599af3088dd7 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
parent
dc267036e3
commit
90a4c69b25
@ -797,7 +797,7 @@ static QPainterPath qt_graphicsItem_shapeFromPath(const QPainterPath &path, cons
|
||||
// if we pass a value of 0.0 to QPainterPathStroker::setWidth()
|
||||
const qreal penWidthZero = qreal(0.00000001);
|
||||
|
||||
if (path == QPainterPath())
|
||||
if (path == QPainterPath() || pen == Qt::NoPen)
|
||||
return path;
|
||||
QPainterPathStroker ps;
|
||||
ps.setCapStyle(pen.capStyle());
|
||||
|
Loading…
Reference in New Issue
Block a user