Limit curve stroking threshold to reasonable range
Avoid unreasonable threshold values for extremely wide pens, since that can lead to a very high processing cost. The rare usecases where this would make a noticeable difference will necessarily also be using scaling, and so is anyway depending on setting a suitable curve threshold manually. Fixes: QTBUG-77241 Change-Id: I27cea7d566d144389bb430739fde4f6033c4a28c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>bb10
parent
63abcfcade
commit
5322998a0b
|
|
@ -209,7 +209,7 @@ public:
|
|||
QStroker();
|
||||
~QStroker();
|
||||
|
||||
void setStrokeWidth(qfixed width) { m_strokeWidth = width; m_curveThreshold = qt_real_to_fixed(width > 4 ? 1.0/width : 0.25); }
|
||||
void setStrokeWidth(qfixed width) { m_strokeWidth = width; m_curveThreshold = qt_real_to_fixed(qBound(0.025, 1.0/width, 0.25)); }
|
||||
qfixed strokeWidth() const { return m_strokeWidth; }
|
||||
|
||||
void setCapStyle(Qt::PenCapStyle capStyle) { m_capStyle = joinModeForCap(capStyle); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue