mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-16 21:30:31 +02:00
updated functionality and set true to test.
Todo: Cleanub and make it activalable
This commit is contained in:
@@ -80,6 +80,9 @@ void IntelliTool::mergeToolLayer(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
activeLayer->image->setImageData(updatedImage);
|
activeLayer->image->setImageData(updatedImage);
|
||||||
|
if(Canvas->image->getPolygonData().size() != 0){
|
||||||
|
activeLayer->image->setPolygon(Canvas->image->getPolygonData());
|
||||||
|
}
|
||||||
Area->DummyGui->UpdateGui();
|
Area->DummyGui->UpdateGui();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ void IntelliToolPolygon::onMouseLeftReleased(int x, int y){
|
|||||||
isInside = false;
|
isInside = false;
|
||||||
isPointNearStart = false;
|
isPointNearStart = false;
|
||||||
isDrawing = false;
|
isDrawing = false;
|
||||||
|
if(false){
|
||||||
std::vector<Triangle> Triangles = IntelliTriangulation::calculateTriangles(QPointList);
|
std::vector<Triangle> Triangles = IntelliTriangulation::calculateTriangles(QPointList);
|
||||||
QPoint Point;
|
QPoint Point;
|
||||||
QColor colorTwo(colorPicker->getSecondColor());
|
QColor colorTwo(colorPicker->getSecondColor());
|
||||||
@@ -89,8 +90,13 @@ void IntelliToolPolygon::onMouseLeftReleased(int x, int y){
|
|||||||
int next = static_cast<int>((i+static_cast<int>(1))%static_cast<int>(QPointList.size()));
|
int next = static_cast<int>((i+static_cast<int>(1))%static_cast<int>(QPointList.size()));
|
||||||
this->Canvas->image->drawLine(QPointList[static_cast<unsigned long long>(i)], QPointList[static_cast<unsigned long long>(next)], colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
this->Canvas->image->drawLine(QPointList[static_cast<unsigned long long>(i)], QPointList[static_cast<unsigned long long>(next)], colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
}
|
}
|
||||||
QPointList.clear();
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Canvas->image->setPolygon(QPointList);
|
||||||
|
}
|
||||||
IntelliTool::onMouseLeftReleased(x,y);
|
IntelliTool::onMouseLeftReleased(x,y);
|
||||||
|
QPointList.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ virtual void onWheelScrolled(int value) override;
|
|||||||
*/
|
*/
|
||||||
virtual void onMouseMoved(int x, int y) override;
|
virtual void onMouseMoved(int x, int y) override;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INTELLITOOLPOLYGON_H
|
#endif // INTELLITOOLPOLYGON_H
|
||||||
|
|||||||
Reference in New Issue
Block a user