{
public:
Curve( const QString& title ):
{
}
protected:
virtual void drawLines
( QPainter *painter,
const QRectF &canvasRect,
int from,
int to
) const {
QwtPointMapper mapper;
mapper.setBoundingRect( canvasRect );
QPolygonF polyline
= mapper.
toPolygonF( xMap, yMap, data
(), from, to
);
fillCurve( painter, xMap, yMap, canvasRect, outline );
}
};
class Curve: public QwtPlotCurve
{
public:
Curve( const QString& title ):
QwtPlotCurve( title )
{
}
protected:
virtual void drawLines( QPainter *painter,
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRectF &canvasRect, int from, int to ) const
{
QwtPointMapper mapper;
mapper.setBoundingRect( canvasRect );
QPolygonF polyline = mapper.toPolygonF( xMap, yMap, data(), from, to );
QPolygonF outline = polyline;
fillCurve( painter, xMap, yMap, canvasRect, outline );
QwtPainter::drawPolyline( painter, polyline );
}
};
To copy to clipboard, switch view to plain text mode
Bookmarks