diff options
author | Andy Nichols <andy.nichols@theqtcompany.com> | 2016-04-12 08:37:09 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-04-13 09:22:36 +0000 |
commit | d210a5c839bc95cd1e382a2be50932e5eff4fbe0 (patch) | |
tree | fad4d4b305762d54a6e913e8e2ffd3e2cc036cf3 /src | |
parent | 0122415d7b1027459606d77a4324eceeace132d2 (diff) |
2DRenderer: Fix rendering of Rectangles with float border width
Previous behavior was to not fill the rectangle completely to the border
because of rounding.
Change-Id: I28d35a5dbe4831a55837f466c0e01601a9d55446
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarerectanglenode.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerectanglenode.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerectanglenode.cpp index 4acb25204e..7672b14371 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerectanglenode.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerectanglenode.cpp @@ -374,8 +374,7 @@ void QSGSoftwareRectangleNode::paintRectangle(QPainter *painter, const QRect &re } - int penWidth = qRound(m_penWidth); - QRectF brushRect = rect.marginsRemoved(QMargins(penWidth, penWidth, penWidth, penWidth)); + QRectF brushRect = QRectF(rect).marginsRemoved(QMarginsF(m_penWidth, m_penWidth, m_penWidth, m_penWidth)); if (brushRect.width() < 0) brushRect.setWidth(0); if (brushRect.height() < 0) |