Mercurio
3rd July 2007, 01:08
Hello all, this is my first post here :o
If I use a gradient brush to fill strokes, the gradient doesn't follow any transformation.
For example:
...
p->rotate(m_rotation);
QLinearGradient lg=QLinearGradient(QPointF(0,0),QPointF(200,200));
lg.setColorAt(1,Qt::transparent);
lg.setColorAt(0,Qt::black);
QPen gp = QPen(Qt::black, 20, Qt::SolidLine, Qt::SquareCap,Qt::RoundJoin);
gp.setBrush(QBrush(lg));
p->setPen(gp);
p->drawRect(0,0,200,200);
...
Instead, it works correctly if I use gradients to fill shapes.
Is this a bug or a feature?
(I'm using qt 4.3)
If I use a gradient brush to fill strokes, the gradient doesn't follow any transformation.
For example:
...
p->rotate(m_rotation);
QLinearGradient lg=QLinearGradient(QPointF(0,0),QPointF(200,200));
lg.setColorAt(1,Qt::transparent);
lg.setColorAt(0,Qt::black);
QPen gp = QPen(Qt::black, 20, Qt::SolidLine, Qt::SquareCap,Qt::RoundJoin);
gp.setBrush(QBrush(lg));
p->setPen(gp);
p->drawRect(0,0,200,200);
...
Instead, it works correctly if I use gradients to fill shapes.
Is this a bug or a feature?
(I'm using qt 4.3)