linearGrad.
setCoordinateMode(QGradient::StretchToDeviceMode);
linearGrad.setColorAt(0, Qt::black);
linearGrad.setColorAt(0.2, Qt::white);
curve->setBrush(linearGrad);
curve->setBaseline(1);
// ???????? ????? ?? ????? ????????? ??????
points <<
QPointF( 0.0,
0.0 ) // ?????????? x, y
QLinearGradient linearGrad(QPointF(0, 1), QPointF(3, 1));
linearGrad.setCoordinateMode(QGradient::StretchToDeviceMode);
linearGrad.setColorAt(0, Qt::black);
linearGrad.setColorAt(0.2, Qt::white);
curve->setBrush(linearGrad);
curve->setBaseline(1);
// ???????? ????? ?? ????? ????????? ??????
QPolygonF points;
points << QPointF( 0.0, 0.0 ) // ?????????? x, y
<< QPointF( 0.5, 1.5 ) << QPointF( 1.0, 1.5 )
<< QPointF( 1.5, 1.0 ) << QPointF( 2.0, 0.5 )
<< QPointF(2.5, 0.5) << QPointF(3.0, 1.0);
To copy to clipboard, switch view to plain text mode
And I get the image:
Bookmarks