mirror of https://github.com/qt/qtbase.git
Further tune curveThreshold setting based on strokeWidth
ad9698713f
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>
This commit is contained in:
parent
ee73df8363
commit
03fd8fa463
|
@ -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); }
|
||||
|
|
|
@ -45,3 +45,10 @@ drawArc 100 350 300 300 5440 5760
|
|||
drawArc 100 350 300 300 5600 5760
|
||||
setPen white
|
||||
drawArc 100 350 300 300 0 5760
|
||||
|
||||
translate 400 300
|
||||
setRenderHint Antialiasing true
|
||||
setPen blue 40
|
||||
drawArc 100 100 200 200 0 4320
|
||||
setPen red 40
|
||||
drawArc 60 60 280 280 0 4320
|
||||
|
|
Loading…
Reference in New Issue