mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-12 19:40:28 +02:00
Update IntelliToolPolygon.cpp
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "IntelliToolPolygon.h"
|
||||
#include "Layer/PaintingArea.h"
|
||||
#include "IntelliHelper/IntelliHelper.h"
|
||||
#include <QDebug>
|
||||
#include <QCursor>
|
||||
|
||||
@@ -53,11 +54,14 @@ void IntelliToolPolygon::onMouseLeftReleased(int x, int y){
|
||||
this->Canvas->image->calculateVisiblity();
|
||||
PointIsNearStart = false;
|
||||
isDrawing = false;
|
||||
std::vector<Triangle> Triangles = IntelliHelper::calculateTriangles(QPointList);
|
||||
QPoint Point(0,0);
|
||||
for(int i = 0; i < width; i++){
|
||||
for(int j = 0; j < height; j++){
|
||||
if(/*funktion(QPointList,i,j)*/false){
|
||||
Point.setX(i);
|
||||
Point.setY(j);
|
||||
if(IntelliHelper::isInPolygon(Triangles,Point)){
|
||||
this->Canvas->image->drawPixel(QPoint(i,j), colorPicker->getFirstColor());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user