// if (eraseFlag == true)
// painter.setPen(QPen(QBrush(QColor(0, 0, 0, 0)), myPenWidth, Qt::SolidLine, Qt::RoundCap,
// Qt::RoundJoin));
// else
painter.
setPen(QPen(myPenColor, myPenWidth, Qt
::SolidLine, Qt
::RoundCap,
Qt::RoundJoin));
painter.drawLine(lastPoint, endPoint);
int rad = (myPenWidth / 2) + 2;
update
(QRect(lastPoint, endPoint
).
normalized() .adjusted(-rad, -rad, +rad, +rad));
lastPoint = endPoint;
QPainter painter(&m_mask);
// if (eraseFlag == true)
// painter.setPen(QPen(QBrush(QColor(0, 0, 0, 0)), myPenWidth, Qt::SolidLine, Qt::RoundCap,
// Qt::RoundJoin));
// else
painter.setPen(QPen(myPenColor, myPenWidth, Qt::SolidLine, Qt::RoundCap,
Qt::RoundJoin));
painter.drawLine(lastPoint, endPoint);
int rad = (myPenWidth / 2) + 2;
update(QRect(lastPoint, endPoint).normalized()
.adjusted(-rad, -rad, +rad, +rad));
lastPoint = endPoint;
To copy to clipboard, switch view to plain text mode
myPenWidth = 3;
myPenColor = Qt::red;
myPenWidth = 3;
myPenColor = Qt::red;
To copy to clipboard, switch view to plain text mode
Bookmarks