Cryle Tool

This commit is contained in:
Sonaion
2019-12-13 13:20:55 +01:00
parent 9f9315c8a4
commit ca9395901b
7 changed files with 125 additions and 3 deletions

View File

@@ -52,6 +52,16 @@ void IntelliImage::drawPixel(const QPoint &p1, const QColor& color){
painter.drawPoint(p1);
}
void IntelliImage::drawPoint(const QPoint &p1, const QColor& color, const int& penWidth){
// Used to draw on the widget
QPainter painter(&imageData);
// Set the current settings for the pen
painter.setPen(QPen(color, penWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
// Draw a line from the last registered point to the current
painter.drawPoint(p1);
}
void IntelliImage::drawLine(const QPoint &p1, const QPoint& p2, const QColor& color, const int& penWidth){
// Used to draw on the widget
QPainter painter(&imageData);