mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-15 04:40:37 +02:00
Automated Release Preparation
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "IntelliColorPicker.h"
|
||||
|
||||
IntelliColorPicker::IntelliColorPicker(){
|
||||
firstColor = {255,0,0,255};
|
||||
secondColor = {0,255,255,255};
|
||||
firstColor = QColor(255,0,0,255);
|
||||
secondColor = QColor(0,255,255,255);
|
||||
}
|
||||
|
||||
IntelliColorPicker::~IntelliColorPicker(){
|
||||
|
||||
@@ -113,7 +113,7 @@ std::vector<Triangle> IntelliTriangulation::calculateTriangles(std::vector<QPoin
|
||||
return Triangles;
|
||||
}
|
||||
|
||||
bool IntelliTriangulation::isInPolygon(std::vector<Triangle> &triangles, QPoint &point){
|
||||
bool IntelliTriangulation::isInPolygon(const std::vector<Triangle> &triangles, QPoint &point){
|
||||
for(auto triangle : triangles) {
|
||||
if(IntelliTriangulation::isInTriangle(triangle, point)) {
|
||||
return true;
|
||||
|
||||
@@ -60,7 +60,7 @@ std::vector<Triangle> calculateTriangles(std::vector<QPoint> polyPoints);
|
||||
* \param point - The point to checl, if it lies in the polygon.
|
||||
* \return Returns true if the point lies in the üpolygon, otherwise false.
|
||||
*/
|
||||
bool isInPolygon(std::vector<Triangle> &triangles, QPoint &point);
|
||||
bool isInPolygon(const std::vector<Triangle> &triangles, QPoint &point);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -330,28 +330,17 @@ void PaintingArea::paintEvent(QPaintEvent*event){
|
||||
update();
|
||||
}
|
||||
|
||||
//TODOJ Resize the image to slightly larger then the main window
|
||||
// to cut down on the need to resize the image
|
||||
void PaintingArea::resizeEvent(QResizeEvent*event){
|
||||
//TODO wait till tool works
|
||||
update();
|
||||
}
|
||||
|
||||
void PaintingArea::resizeLayer(QImage*image_res, const QSize &newSize){
|
||||
//TODO implement
|
||||
}
|
||||
|
||||
void PaintingArea::selectLayerUp(){
|
||||
updateTools();
|
||||
if(activeLayer!=-1 && static_cast<unsigned long long>(activeLayer)<layerBundle.size() - 1) {
|
||||
std::swap(layerBundle[static_cast<unsigned long long>(activeLayer)], layerBundle[static_cast<unsigned long long>(activeLayer + 1)]);
|
||||
if(activeLayer != -1 && static_cast<size_t>(activeLayer)<layerBundle.size() - 1) {
|
||||
std::swap(layerBundle[static_cast<size_t>(activeLayer)], layerBundle[static_cast<size_t>(activeLayer + 1)]);
|
||||
activeLayer++;
|
||||
}
|
||||
}
|
||||
|
||||
void PaintingArea::selectLayerDown(){
|
||||
updateTools();
|
||||
if(activeLayer!=-1 && activeLayer>0) {
|
||||
if(activeLayer>0) {
|
||||
std::swap(layerBundle[static_cast<unsigned long long>(activeLayer)], layerBundle[static_cast<unsigned long long>(activeLayer - 1)]);
|
||||
activeLayer--;
|
||||
}
|
||||
|
||||
@@ -221,8 +221,6 @@ void wheelEvent(QWheelEvent*event) override;
|
||||
|
||||
void paintEvent(QPaintEvent*event) override;
|
||||
|
||||
void resizeEvent(QResizeEvent*event) override;
|
||||
|
||||
private:
|
||||
void setLayerDimensions(int maxWidth, int maxHeight);
|
||||
void selectLayerUp();
|
||||
@@ -244,8 +242,6 @@ int activeLayer = -1;
|
||||
|
||||
void drawLayers(bool forSaving = false);
|
||||
|
||||
void resizeLayer(QImage*image_res, const QSize &newSize);
|
||||
|
||||
bool createTempTopLayer(int idx);
|
||||
|
||||
void updateTools();
|
||||
|
||||
@@ -6,6 +6,9 @@ IntelliTool::IntelliTool(PaintingArea* Area, IntelliColorPicker* colorPicker, In
|
||||
this->colorPicker = colorPicker;
|
||||
this->Toolsettings = Toolsettings;
|
||||
this->isDrawing = false;
|
||||
this->ActiveType = Tooltype::NONE;
|
||||
this->activeLayer = nullptr;
|
||||
this->Canvas = nullptr;
|
||||
}
|
||||
|
||||
IntelliTool::~IntelliTool(){
|
||||
@@ -14,7 +17,7 @@ IntelliTool::~IntelliTool(){
|
||||
|
||||
void IntelliTool::onMouseRightPressed(int x, int y){
|
||||
if(isDrawing) {
|
||||
isDrawing = false;
|
||||
isDrawing = false;
|
||||
this->deleteToolLayer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ enum class Tooltype {
|
||||
PEN,
|
||||
PLAIN,
|
||||
POLYGON,
|
||||
RECTANGLE
|
||||
RECTANGLE,
|
||||
NONE
|
||||
};
|
||||
private:
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user