diff options
author | Eirik Aavitsland <eirik.aavitsland@theqtcompany.com> | 2015-06-08 14:53:29 +0200 |
---|---|---|
committer | aavit <eirik.aavitsland@theqtcompany.com> | 2015-06-22 08:19:57 +0000 |
commit | 03fd8fa46356a70c9eabcf7ca703ddaa5e16e96f (patch) | |
tree | db7058f72af825794861622e21e3a61dfc152ad4 /src/gui | |
parent | ee73df83639eecab2979677868a5cc9fadb2b7a0 (diff) |
Further tune curveThreshold setting based on strokeWidth
ad9698713f91a2e706fcd391f9806057649632ff reduced the curvethreshold
for wide lines, to fix QTBUG-46151. But as a side effect, the
threshold was increased for lines of widths >=0 and <4. This commit
fixes that, and also adds a lance test for the issue in QTBUG-46151.
Change-Id: I52507db622435fe1d2646640cb0bd9cd8222e453
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qstroker_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qstroker_p.h b/src/gui/painting/qstroker_p.h index f967c091df..d3765bbd29 100644 --- a/src/gui/painting/qstroker_p.h +++ b/src/gui/painting/qstroker_p.h @@ -201,7 +201,7 @@ public: QStroker(); ~QStroker(); - void setStrokeWidth(qfixed width) { m_strokeWidth = width; m_curveThreshold = width >= 1 ? 1.0/width : 0.5;} + void setStrokeWidth(qfixed width) { m_strokeWidth = width; m_curveThreshold = qt_real_to_fixed(width > 4 ? 1.0/width : 0.25); } qfixed strokeWidth() const { return m_strokeWidth; } void setCapStyle(Qt::PenCapStyle capStyle) { m_capStyle = joinModeForCap(capStyle); } |