Removed Linestyle from the project

This commit is contained in:
2020-01-15 12:01:17 +01:00
parent c4467b70b8
commit af5a05faf8
4 changed files with 3 additions and 28 deletions

View File

@@ -40,18 +40,7 @@ void IntelliToolLine::onMouseMoved(int x, int y){
if(this->isDrawing) {
this->Canvas->image->drawPlain(Qt::transparent);
QPoint next(x,y);
switch(Toolsettings->getLinestyle()) {
case IntelliToolsettings::LineStyle::SOLID_LINE:
this->Canvas->image->drawLine(lineStartingPoint,next,colorPicker->getFirstColor(),Toolsettings->getLineWidth());
break;
case IntelliToolsettings::LineStyle::DOTTED_LINE:
QPoint p1 =lineStartingPoint.x() <= next.x() ? lineStartingPoint : next;
QPoint p2 =lineStartingPoint.x() < next.x() ? next : lineStartingPoint;
int m = static_cast<int>(static_cast<float>(p2.y()-p1.y())/static_cast<float>(p2.x()-p1.x())+0.5f);
int c = lineStartingPoint.y()-lineStartingPoint.x()*m;
//TODO implement dotted algorithm
break;
}
this->Canvas->image->drawLine(lineStartingPoint,next,colorPicker->getFirstColor(),Toolsettings->getLineWidth());
}
IntelliTool::onMouseMoved(x,y);
}

View File

@@ -16,7 +16,7 @@ QPoint lineStartingPoint;
public:
/*!
* \brief A constructor setting the general paintingArea and colorPicker. And reading in the lineWidth and lineStyle.
* \brief A constructor setting the general paintingArea and colorPicker.
* \param Area - The general paintingArea used by the project.
* \param colorPicker - The general colorPicker used by the project.
*/