allting
15th May 2010, 08:12
Hi there.
I want to draw bezier with QPainterPath.
but moveTo() method draws one pixel line like attached image.
my code here.
QPoint s1, s2, e1, e2, cp11, cp12, cp21, cp22;
...
QPainterPath path;
path.moveTo(s2);
path.lineTo(s1);
path.cubicTo(cp11, cp12, e1);
path.lineTo(e2);
path.moveTo(s2); /// this line draws one pixel line...
path.cubicTo(cp21, cp22, e2);
pPainter_->setPen(Qt::NoPen);
pPainter_->fillPath(path, QBrush(QColor(aFillColor.r, aFillColor.b, aFillColor.g)));
How can i remove one pixel line on the bezier?
thanks
I want to draw bezier with QPainterPath.
but moveTo() method draws one pixel line like attached image.
my code here.
QPoint s1, s2, e1, e2, cp11, cp12, cp21, cp22;
...
QPainterPath path;
path.moveTo(s2);
path.lineTo(s1);
path.cubicTo(cp11, cp12, e1);
path.lineTo(e2);
path.moveTo(s2); /// this line draws one pixel line...
path.cubicTo(cp21, cp22, e2);
pPainter_->setPen(Qt::NoPen);
pPainter_->fillPath(path, QBrush(QColor(aFillColor.r, aFillColor.b, aFillColor.g)));
How can i remove one pixel line on the bezier?
thanks