void Curve
::fillCurve(QPainter *painter,
{
painter->save();
painter->setBrush(*brush1);
painter->setClipRect(0,yMap.transform(baseline()),1000,1000,
Qt::ReplaceClip);
// QwtPlotCurve::fillCurve(painter, xMap, yMap, canvasRect, polygon);
painter->setClipRect(0,0,1000,yMap.transform(baseline()),
Qt::ReplaceClip);
QwtPlotCurve::fillCurve(painter, xMap, yMap, canvasRect, polygon
);
painter->restore();
}
void Curve::fillCurve(QPainter *painter,
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRectF & canvasRect, QPolygonF & polygon) const
{
painter->save();
QBrush *brush1 = new QBrush (Qt::green, Qt::SolidPattern);
painter->setBrush(*brush1);
painter->setClipRect(0,yMap.transform(baseline()),1000,1000,
Qt::ReplaceClip);
// QwtPlotCurve::fillCurve(painter, xMap, yMap, canvasRect, polygon);
painter->setClipRect(0,0,1000,yMap.transform(baseline()),
Qt::ReplaceClip);
QwtPlotCurve::fillCurve(painter, xMap, yMap, canvasRect, polygon);
painter->restore();
}
To copy to clipboard, switch view to plain text mode
Bookmarks