I'm finding, and seeing in Qwt 6.1.3 code, that the QPolygonF QwtCurveFitter::fitCurve(const QPolygonF&) const virtual method is being called only for QwtPlotCurves having the QwtPlotCurve::Lines curve style, and not for the QwtPlotCurve::Steps curve style.
I am seeing a call to fitCurve() in QwtPlotCurve::drawLines (QPainter* ..), but not in QwtPlotCurve::drawSteps (QPainter* ..).
I believe QwtWeedingCurveFitter would work for us in the Steps style, and we do kinda need it. Is there a fundamental reason why the algorithm ("Douglas and Peucker") or this implementation would be fundamentally unworkable for stepped curves?
If I'm seeing this correctly, I think we would have to modify QwtPlotCurve::drawSteps (QPainter* ..) to try this. Yes? But I'm wondering if that's an entirely arithmetically foolish thing to even be trying.
-----
FWIW ... I created a QwtWeedingCurveFitter subclass to do some of our own caching of the QwtWeedingCurveFitter results (also to dynamically track instance life-cycle) -- though I'm finding cache hits to not be especially successful, for apparent reasons.
This is coming up in my attempt to address the problem described in this other post ... http://www.qtcentre.org/threads/68094 ("Dense Qwt curves with dotted or dashed line style generally look solid").Qt Code:
class WeedFitter : public QwtWeedingCurveFitter { private: static int _instanceCnt; const int _instanceNum; QwtPlotCurve* _clientCurve; mutable QPolygonF _cachedInpPoints; mutable QPolygonF _cachedFiltPoints; public: virtual ~WeedFitter(); // virtual from QwtWeedingCurveFitter };To copy to clipboard, switch view to plain text mode
Bookmarks