Merge branch 'Helper_Variablen' into 'dev'
Helper variablen See merge request creyd/intelliphoto!33
13
src/Bilder.qrc
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/Icons/Buttons">
|
||||||
|
<file>icons/icon.png</file>
|
||||||
|
<file>icons/circle-tool.svg</file>
|
||||||
|
<file>icons/eraser-tool.svg</file>
|
||||||
|
<file>icons/flood-fill-tool.svg</file>
|
||||||
|
<file>icons/magic-wand-tool.svg</file>
|
||||||
|
<file>icons/pen-tool.svg</file>
|
||||||
|
<file>icons/polygon-tool.svg</file>
|
||||||
|
<file>icons/rectangle-tool.svg</file>
|
||||||
|
<file>icons/Wechselpfeile.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
// ---------- IntelliPhotoGui.cpp ----------
|
// ---------- IntelliPhotoGui.cpp ----------
|
||||||
|
|
||||||
#include <QtWidgets>
|
|
||||||
#include <QPixmap>
|
|
||||||
|
|
||||||
#include "IntelliPhotoGui.h"
|
#include "IntelliPhotoGui.h"
|
||||||
#include "Layer/PaintingArea.h"
|
#include "Layer/PaintingArea.h"
|
||||||
|
|
||||||
@@ -19,7 +16,7 @@ IntelliPhotoGui::IntelliPhotoGui(){
|
|||||||
// Size the app
|
// Size the app
|
||||||
resize(600,600);
|
resize(600,600);
|
||||||
showMaximized();
|
showMaximized();
|
||||||
|
setDefaultToolValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
// User tried to close the app
|
// User tried to close the app
|
||||||
@@ -84,7 +81,7 @@ void IntelliPhotoGui::slotCreateNewLayer(){
|
|||||||
if (ok1&&ok2)
|
if (ok1&&ok2)
|
||||||
{
|
{
|
||||||
int layer = paintingArea->addLayer(width,height,0,0);
|
int layer = paintingArea->addLayer(width,height,0,0);
|
||||||
paintingArea->slotActivateLayer(layer);
|
UpdateGui();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,10 +95,12 @@ void IntelliPhotoGui::slotDeleteLayer(){
|
|||||||
// Define the standard Value, min, max, step and ok button
|
// Define the standard Value, min, max, step and ok button
|
||||||
int layerNumber = QInputDialog::getInt(this, tr("delete Layer"),
|
int layerNumber = QInputDialog::getInt(this, tr("delete Layer"),
|
||||||
tr("Number:"),
|
tr("Number:"),
|
||||||
1,0, 500, 1, &ok);
|
paintingArea->getNumberOfActiveLayer(),0, 500, 1, &ok);
|
||||||
// Create New Layer
|
// Create New Layer
|
||||||
if (ok)
|
if (ok){
|
||||||
paintingArea->deleteLayer(layerNumber);
|
paintingArea->deleteLayer(layerNumber);
|
||||||
|
UpdateGui();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotSetActiveAlpha(){
|
void IntelliPhotoGui::slotSetActiveAlpha(){
|
||||||
@@ -121,6 +120,7 @@ void IntelliPhotoGui::slotSetActiveAlpha(){
|
|||||||
if (ok1&&ok2)
|
if (ok1&&ok2)
|
||||||
{
|
{
|
||||||
paintingArea->setLayerAlpha(layer,alpha);
|
paintingArea->setLayerAlpha(layer,alpha);
|
||||||
|
UpdateGui();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,6 +179,7 @@ void IntelliPhotoGui::slotClearActiveLayer(){
|
|||||||
if (ok1&&ok2&&ok3&&ok4)
|
if (ok1&&ok2&&ok3&&ok4)
|
||||||
{
|
{
|
||||||
paintingArea->floodFill(red, green, blue, alpha);
|
paintingArea->floodFill(red, green, blue, alpha);
|
||||||
|
UpdateGui();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,46 +196,57 @@ void IntelliPhotoGui::slotSetActiveLayer(){
|
|||||||
if (ok1)
|
if (ok1)
|
||||||
{
|
{
|
||||||
paintingArea->setLayerActive(layer);
|
paintingArea->setLayerActive(layer);
|
||||||
|
UpdateGui();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotSetFirstColor(){
|
void IntelliPhotoGui::slotSetFirstColor(){
|
||||||
paintingArea->colorPickerSetFirstColor();
|
paintingArea->colorPickerSetFirstColor();
|
||||||
|
UpdateGui();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotSetSecondColor(){
|
void IntelliPhotoGui::slotSetSecondColor(){
|
||||||
paintingArea->colorPickerSetSecondColor();
|
paintingArea->colorPickerSetSecondColor();
|
||||||
|
UpdateGui();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotSwapColor(){
|
void IntelliPhotoGui::slotSwapColor(){
|
||||||
paintingArea->colorPickerSwapColors();
|
paintingArea->colorPickerSwapColors();
|
||||||
|
UpdateGui();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotCreatePenTool(){
|
void IntelliPhotoGui::slotCreatePenTool(){
|
||||||
|
PenButton->setChecked(true);
|
||||||
paintingArea->createPenTool();
|
paintingArea->createPenTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotCreatePlainTool(){
|
void IntelliPhotoGui::slotCreatePlainTool(){
|
||||||
|
PlainButton->setChecked(true);
|
||||||
paintingArea->createPlainTool();
|
paintingArea->createPlainTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotCreateLineTool(){
|
void IntelliPhotoGui::slotCreateLineTool(){
|
||||||
|
LineButton->setChecked(true);
|
||||||
paintingArea->createLineTool();
|
paintingArea->createLineTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotCreateRectangleTool(){
|
void IntelliPhotoGui::slotCreateRectangleTool(){
|
||||||
|
RectangleButton->setChecked(true);
|
||||||
paintingArea->createRectangleTool();
|
paintingArea->createRectangleTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotCreateCircleTool(){
|
void IntelliPhotoGui::slotCreateCircleTool(){
|
||||||
|
CircleButton->setChecked(true);
|
||||||
paintingArea->createCircleTool();
|
paintingArea->createCircleTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotCreatePolygonTool(){
|
void IntelliPhotoGui::slotCreatePolygonTool(){
|
||||||
|
PolygonButton->setChecked(true);
|
||||||
paintingArea->createPolygonTool();
|
paintingArea->createPolygonTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotCreateFloodFillTool(){
|
void IntelliPhotoGui::slotCreateFloodFillTool(){
|
||||||
|
FloodFillButton->setChecked(true);
|
||||||
paintingArea->createFloodFillTool();
|
paintingArea->createFloodFillTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,6 +257,29 @@ void IntelliPhotoGui::slotAboutDialog(){
|
|||||||
tr("<p><b>IntelliPhoto</b>Pretty basic editor.</p>"));
|
tr("<p><b>IntelliPhoto</b>Pretty basic editor.</p>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IntelliPhotoGui::slotEnterPressed(){
|
||||||
|
QString string = EditLineWidth->text();
|
||||||
|
if(string.toInt() > 50){
|
||||||
|
EditLineWidth->setText("50");
|
||||||
|
}
|
||||||
|
paintingArea->Toolsettings.setLineWidth(string.toInt());
|
||||||
|
string = EditLineInnerAlpha->text();
|
||||||
|
if(string.toInt() > 255){
|
||||||
|
EditLineInnerAlpha->setText("255");
|
||||||
|
}
|
||||||
|
paintingArea->Toolsettings.setInnerAlpha(string.toInt());
|
||||||
|
}
|
||||||
|
|
||||||
|
void IntelliPhotoGui::slotResetTools(){
|
||||||
|
CircleButton->setChecked(false);
|
||||||
|
FloodFillButton->setChecked(false);
|
||||||
|
LineButton->setChecked(false);
|
||||||
|
PenButton->setChecked(false);
|
||||||
|
PlainButton->setChecked(false);
|
||||||
|
PolygonButton->setChecked(false);
|
||||||
|
RectangleButton->setChecked(false);
|
||||||
|
}
|
||||||
|
|
||||||
// Define menu actions that call functions
|
// Define menu actions that call functions
|
||||||
void IntelliPhotoGui::createActions(){
|
void IntelliPhotoGui::createActions(){
|
||||||
// Get a list of the supported file formats
|
// Get a list of the supported file formats
|
||||||
@@ -324,34 +359,45 @@ void IntelliPhotoGui::createActions(){
|
|||||||
//Create Color Actions here
|
//Create Color Actions here
|
||||||
actionColorPickerFirstColor = new QAction(tr("&Main"), this);
|
actionColorPickerFirstColor = new QAction(tr("&Main"), this);
|
||||||
connect(actionColorPickerFirstColor, SIGNAL(triggered()), this, SLOT(slotSetFirstColor()));
|
connect(actionColorPickerFirstColor, SIGNAL(triggered()), this, SLOT(slotSetFirstColor()));
|
||||||
|
connect(FirstColorButton, SIGNAL(clicked()), this, SLOT(slotSetFirstColor()));
|
||||||
|
|
||||||
actionColorPickerSecondColor = new QAction(tr("&Secondary"), this);
|
actionColorPickerSecondColor = new QAction(tr("&Secondary"), this);
|
||||||
connect(actionColorPickerSecondColor, SIGNAL(triggered()), this, SLOT(slotSetSecondColor()));
|
connect(actionColorPickerSecondColor, SIGNAL(triggered()), this, SLOT(slotSetSecondColor()));
|
||||||
|
connect(SecondColorButton, SIGNAL(clicked()), this, SLOT(slotSetSecondColor()));
|
||||||
|
|
||||||
actionColorSwap = new QAction(tr("&Switch"), this);
|
actionColorSwap = new QAction(tr("&Switch"), this);
|
||||||
actionColorSwap->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S));
|
actionColorSwap->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S));
|
||||||
connect(actionColorSwap, SIGNAL(triggered()), this, SLOT(slotSwapColor()));
|
connect(actionColorSwap, SIGNAL(triggered()), this, SLOT(slotSwapColor()));
|
||||||
|
connect(SwitchColorButton, SIGNAL(clicked()), this, SLOT(slotSwapColor()));
|
||||||
|
|
||||||
//Create Tool actions down here
|
//Create Tool actions down here
|
||||||
actionCreatePlainTool = new QAction(tr("&Plain"), this);
|
actionCreatePlainTool = new QAction(tr("&Plain"), this);
|
||||||
|
connect(actionCreatePlainTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreatePlainTool, SIGNAL(triggered()), this, SLOT(slotCreatePlainTool()));
|
connect(actionCreatePlainTool, SIGNAL(triggered()), this, SLOT(slotCreatePlainTool()));
|
||||||
|
|
||||||
|
|
||||||
actionCreatePenTool = new QAction(tr("&Pen"),this);
|
actionCreatePenTool = new QAction(tr("&Pen"),this);
|
||||||
connect(actionCreatePenTool, SIGNAL(triggered()), this, SLOT(slotCreatePenTool()));
|
connect(actionCreatePenTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
|
connect(actionCreatePenTool, SIGNAL(triggered()), this, SLOT(slotCreatePenTool()));
|
||||||
|
|
||||||
actionCreateLineTool = new QAction(tr("&Line"), this);
|
actionCreateLineTool = new QAction(tr("&Line"), this);
|
||||||
|
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotCreateLineTool()));
|
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotCreateLineTool()));
|
||||||
|
|
||||||
actionCreateCircleTool = new QAction(tr("&Circle"), this);
|
actionCreateCircleTool = new QAction(tr("&Circle"), this);
|
||||||
|
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotCreateCircleTool()));
|
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotCreateCircleTool()));
|
||||||
|
|
||||||
actionCreateRectangleTool = new QAction(tr("&Rectangle"), this);
|
actionCreateRectangleTool = new QAction(tr("&Rectangle"), this);
|
||||||
|
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotCreateRectangleTool()));
|
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotCreateRectangleTool()));
|
||||||
|
|
||||||
actionCreatePolygonTool = new QAction(tr("&Polygon"), this);
|
actionCreatePolygonTool = new QAction(tr("&Polygon"), this);
|
||||||
|
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotCreatePolygonTool()));
|
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotCreatePolygonTool()));
|
||||||
|
|
||||||
actionCreateFloodFillTool = new QAction(tr("&FloodFill"), this);
|
actionCreateFloodFillTool = new QAction(tr("&FloodFill"), this);
|
||||||
|
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool()));
|
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool()));
|
||||||
|
|
||||||
// Create about action and tie to IntelliPhotoGui::about()
|
// Create about action and tie to IntelliPhotoGui::about()
|
||||||
@@ -361,6 +407,30 @@ void IntelliPhotoGui::createActions(){
|
|||||||
// Create about Qt action and tie to IntelliPhotoGui::aboutQt()
|
// Create about Qt action and tie to IntelliPhotoGui::aboutQt()
|
||||||
actionAboutQtDialog = new QAction(tr("About &Qt"), this);
|
actionAboutQtDialog = new QAction(tr("About &Qt"), this);
|
||||||
connect(actionAboutQtDialog, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
connect(actionAboutQtDialog, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
||||||
|
|
||||||
|
connect(EditLineWidth, SIGNAL(returnPressed()), this, SLOT(slotEnterPressed()));
|
||||||
|
connect(EditLineInnerAlpha, SIGNAL(returnPressed()), this, SLOT(slotEnterPressed()));
|
||||||
|
|
||||||
|
connect(CircleButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||||
|
connect(CircleButton, SIGNAL(clicked()), this, SLOT(slotCreateCircleTool()));
|
||||||
|
|
||||||
|
connect(FloodFillButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||||
|
connect(FloodFillButton, SIGNAL(clicked()), this, SLOT(slotCreateFloodFillTool()));
|
||||||
|
|
||||||
|
connect(LineButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||||
|
connect(LineButton, SIGNAL(clicked()), this, SLOT(slotCreateLineTool()));
|
||||||
|
|
||||||
|
connect(PenButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||||
|
connect(PenButton, SIGNAL(clicked()), this, SLOT(slotCreatePenTool()));
|
||||||
|
|
||||||
|
connect(PlainButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||||
|
connect(PlainButton, SIGNAL(clicked()), this, SLOT(slotCreatePlainTool()));
|
||||||
|
|
||||||
|
connect(PolygonButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||||
|
connect(PolygonButton, SIGNAL(clicked()), this, SLOT(slotCreatePolygonTool()));
|
||||||
|
|
||||||
|
connect(RectangleButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||||
|
connect(RectangleButton, SIGNAL(clicked()), this, SLOT(slotCreateRectangleTool()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the menubar
|
// Create the menubar
|
||||||
@@ -436,18 +506,137 @@ void IntelliPhotoGui::createGui(){
|
|||||||
|
|
||||||
// create Gui elements
|
// create Gui elements
|
||||||
paintingArea = new PaintingArea();
|
paintingArea = new PaintingArea();
|
||||||
|
paintingArea->DumpyGui = this;
|
||||||
|
|
||||||
|
p = QPixmap(":/Icons/Buttons/icons/circle-tool.svg");
|
||||||
|
CircleButton = new QPushButton();
|
||||||
|
CircleButton->setFixedSize(Buttonsize);
|
||||||
|
CircleButton->setIcon(p);
|
||||||
|
CircleButton->setIconSize(Buttonsize);
|
||||||
|
CircleButton->setCheckable(true);
|
||||||
|
|
||||||
|
p = QPixmap(":/Icons/Buttons/icons/flood-fill-tool.svg");
|
||||||
|
FloodFillButton = new QPushButton();
|
||||||
|
FloodFillButton->setFixedSize(Buttonsize);
|
||||||
|
FloodFillButton->setIcon(p);
|
||||||
|
FloodFillButton->setIconSize(Buttonsize);
|
||||||
|
FloodFillButton->setCheckable(true);
|
||||||
|
|
||||||
|
p = QPixmap(":/Icons/Buttons/icons/icon.png");
|
||||||
|
LineButton = new QPushButton();
|
||||||
|
LineButton->setFixedSize(Buttonsize);
|
||||||
|
LineButton->setIcon(p);
|
||||||
|
LineButton->setIconSize(Buttonsize);
|
||||||
|
LineButton->setCheckable(true);
|
||||||
|
|
||||||
|
p = QPixmap(":/Icons/Buttons/icons/pen-tool.svg");
|
||||||
|
PenButton = new QPushButton();
|
||||||
|
PenButton->setFixedSize(Buttonsize);
|
||||||
|
PenButton->setIcon(p);
|
||||||
|
PenButton->setIconSize(Buttonsize);
|
||||||
|
PenButton->setCheckable(true);
|
||||||
|
|
||||||
|
p = QPixmap(":/Icons/Buttons/icons/icon.png");
|
||||||
|
PlainButton = new QPushButton();
|
||||||
|
PlainButton->setFixedSize(Buttonsize);
|
||||||
|
PlainButton->setIcon(p);
|
||||||
|
PlainButton->setIconSize(Buttonsize);
|
||||||
|
PlainButton->setCheckable(true);
|
||||||
|
|
||||||
|
p = QPixmap(":/Icons/Buttons/icons/polygon-tool.svg");
|
||||||
|
PolygonButton = new QPushButton();
|
||||||
|
PolygonButton->setFixedSize(Buttonsize);
|
||||||
|
PolygonButton->setIcon(p);
|
||||||
|
PolygonButton->setIconSize(Buttonsize);
|
||||||
|
PolygonButton->setCheckable(true);
|
||||||
|
|
||||||
|
p = QPixmap(":/Icons/Buttons/icons/rectangle-tool.svg");
|
||||||
|
RectangleButton = new QPushButton();
|
||||||
|
RectangleButton->setFixedSize(Buttonsize);
|
||||||
|
RectangleButton->setIcon(p);
|
||||||
|
RectangleButton->setIconSize(Buttonsize);
|
||||||
|
RectangleButton->setCheckable(true);
|
||||||
|
|
||||||
|
WidthLine = new QLabel();
|
||||||
|
WidthLine->setText("Width");
|
||||||
|
WidthLine->setFixedSize(Buttonsize.width(),Buttonsize.height()/3);
|
||||||
|
|
||||||
|
EditLineWidth = new QLineEdit();
|
||||||
|
EditLineWidth->setFixedSize(Buttonsize.width(),Buttonsize.height()/3);
|
||||||
|
EditLineWidth->setText("5");
|
||||||
|
ValidatorLineWidth = new QIntValidator();
|
||||||
|
ValidatorLineWidth->setTop(99);
|
||||||
|
ValidatorLineWidth->setBottom(1);
|
||||||
|
EditLineWidth->setValidator(ValidatorLineWidth);
|
||||||
|
|
||||||
|
innerAlphaLine = new QLabel();
|
||||||
|
innerAlphaLine->setText("Inner Alpha");
|
||||||
|
innerAlphaLine->setFixedSize(Buttonsize.width(),Buttonsize.height()/3);
|
||||||
|
|
||||||
|
EditLineInnerAlpha = new QLineEdit();
|
||||||
|
EditLineInnerAlpha->setFixedSize(Buttonsize.width(),Buttonsize.height()/3);
|
||||||
|
EditLineInnerAlpha->setText("255");
|
||||||
|
ValidatorInnerAlpha = new QIntValidator();
|
||||||
|
ValidatorInnerAlpha->setTop(999);
|
||||||
|
ValidatorInnerAlpha->setBottom(0);
|
||||||
|
EditLineInnerAlpha->setValidator(ValidatorInnerAlpha);
|
||||||
|
|
||||||
|
FirstColorButton = new QPushButton();
|
||||||
|
FirstColorButton->setFixedSize(Buttonsize/2);
|
||||||
|
|
||||||
|
SecondColorButton = new QPushButton();
|
||||||
|
SecondColorButton->setFixedSize(Buttonsize/2);
|
||||||
|
|
||||||
|
p = QPixmap(":/Icons/Buttons/icons/Wechselpfeile.png");
|
||||||
|
SwitchColorButton = new QPushButton();
|
||||||
|
SwitchColorButton->setFixedSize(Buttonsize.width(),Buttonsize.height()/2);
|
||||||
|
SwitchColorButton->setIcon(p);
|
||||||
|
SwitchColorButton->setIconSize(QSize(Buttonsize.width(),Buttonsize.height()/2));
|
||||||
|
|
||||||
|
ActiveLayerLine = new QLabel();
|
||||||
|
QString string = QString("Active Layer: %1").arg(paintingArea->getNumberOfActiveLayer());
|
||||||
|
ActiveLayerLine->setText(string);
|
||||||
|
ActiveLayerLine->setFixedSize(Buttonsize.width()+10,Buttonsize.height()/3);
|
||||||
|
|
||||||
|
p = p.fromImage(paintingArea->getImageOfActiveLayer()->getImageData());
|
||||||
|
|
||||||
|
ActiveLayerImageButton = new QPushButton();
|
||||||
|
ActiveLayerImageButton->setFixedSize(Buttonsize);
|
||||||
|
ActiveLayerImageButton->setIcon(p);
|
||||||
|
ActiveLayerImageButton->setIconSize(Buttonsize);
|
||||||
|
|
||||||
// set gui elements
|
// set gui elements
|
||||||
mainLayout->addWidget(paintingArea);
|
|
||||||
|
mainLayout->addWidget(paintingArea,1,1,20,1);
|
||||||
|
mainLayout->addWidget(CircleButton,1,2,1,2);
|
||||||
|
mainLayout->addWidget(FloodFillButton,2,2,1,2);
|
||||||
|
mainLayout->addWidget(LineButton,3,2,1,2);
|
||||||
|
mainLayout->addWidget(PenButton,4,2,1,2);
|
||||||
|
mainLayout->addWidget(PlainButton,5,2,1,2);
|
||||||
|
mainLayout->addWidget(PolygonButton,6,2,1,2);
|
||||||
|
mainLayout->addWidget(RectangleButton,7,2,1,2);
|
||||||
|
mainLayout->addWidget(WidthLine,8,2,1,2);
|
||||||
|
mainLayout->addWidget(EditLineWidth,9,2,1,2);
|
||||||
|
mainLayout->addWidget(innerAlphaLine,10,2,1,2);
|
||||||
|
mainLayout->addWidget(EditLineInnerAlpha,11,2,1,2);
|
||||||
|
mainLayout->addWidget(FirstColorButton,12,2,1,1);
|
||||||
|
mainLayout->addWidget(SecondColorButton,12,3,1,1);
|
||||||
|
mainLayout->addWidget(SwitchColorButton,13,2,1,2);
|
||||||
|
mainLayout->addWidget(ActiveLayerLine,14,2,1,2);
|
||||||
|
mainLayout->addWidget(ActiveLayerImageButton,15,2,1,2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::setIntelliStyle(){
|
void IntelliPhotoGui::setIntelliStyle(){
|
||||||
// Set the title
|
// Set the title
|
||||||
setWindowTitle("IntelliPhoto Prototype");
|
setWindowTitle("IntelliPhoto Prototype");
|
||||||
// Set style sheet
|
// Set style sheet
|
||||||
this->setStyleSheet("background-color:rgb(64,64,64)");
|
this->setStyleSheet("background-color:rgb(64,64,64)");
|
||||||
this->centralGuiWidget->setStyleSheet("color:rgb(255,255,255)");
|
this->centralGuiWidget->setStyleSheet("color:rgb(255,255,255)");
|
||||||
this->menuBar()->setStyleSheet("color:rgb(255,255,255)");
|
this->menuBar()->setStyleSheet("color:rgb(255,255,255)");
|
||||||
|
QString string = QString("background-color: %1").arg(paintingArea->colorPicker.getFirstColor().name());
|
||||||
|
FirstColorButton->setStyleSheet(string);
|
||||||
|
string = QString("background-color: %1").arg(paintingArea->colorPicker.getSecondColor().name());
|
||||||
|
SecondColorButton->setStyleSheet(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IntelliPhotoGui::maybeSave(){
|
bool IntelliPhotoGui::maybeSave(){
|
||||||
@@ -497,3 +686,20 @@ bool IntelliPhotoGui::saveFile(const QByteArray &fileFormat){
|
|||||||
return paintingArea->save(fileName, fileFormat.constData());
|
return paintingArea->save(fileName, fileFormat.constData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IntelliPhotoGui::setDefaultToolValue(){
|
||||||
|
slotEnterPressed();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IntelliPhotoGui::UpdateGui(){
|
||||||
|
QString string = QString("Active Layer: %1").arg(paintingArea->getNumberOfActiveLayer());
|
||||||
|
ActiveLayerLine->setText(string);
|
||||||
|
p = p.fromImage(paintingArea->getImageOfActiveLayer()->getImageData());
|
||||||
|
ActiveLayerImageButton->setIcon(p);
|
||||||
|
ActiveLayerImageButton->setIconSize(Buttonsize);
|
||||||
|
|
||||||
|
string = QString("background-color: %1").arg(paintingArea->colorPicker.getFirstColor().name());
|
||||||
|
FirstColorButton->setStyleSheet(string);
|
||||||
|
string = QString("background-color: %1").arg(paintingArea->colorPicker.getSecondColor().name());
|
||||||
|
SecondColorButton->setStyleSheet(string);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#ifndef IntelliPhotoGui_H
|
#ifndef IntelliPhotoGui_H
|
||||||
#define IntelliPhotoGui_H
|
#define IntelliPhotoGui_H
|
||||||
|
|
||||||
|
#include <QtWidgets>
|
||||||
|
#include <QPixmap>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
@@ -30,6 +32,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
IntelliPhotoGui();
|
IntelliPhotoGui();
|
||||||
|
|
||||||
|
void UpdateGui();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Function used to close an event
|
// Function used to close an event
|
||||||
void closeEvent(QCloseEvent*event) override;
|
void closeEvent(QCloseEvent*event) override;
|
||||||
@@ -69,6 +73,10 @@ void slotCreateFloodFillTool();
|
|||||||
// slots for dialogs
|
// slots for dialogs
|
||||||
void slotAboutDialog();
|
void slotAboutDialog();
|
||||||
|
|
||||||
|
void slotEnterPressed();
|
||||||
|
|
||||||
|
void slotResetTools();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Will tie user actions to functions
|
// Will tie user actions to functions
|
||||||
void createActions();
|
void createActions();
|
||||||
@@ -83,9 +91,34 @@ bool maybeSave();
|
|||||||
// Opens the Save dialog and saves
|
// Opens the Save dialog and saves
|
||||||
bool saveFile(const QByteArray &fileFormat);
|
bool saveFile(const QByteArray &fileFormat);
|
||||||
|
|
||||||
|
void setDefaultToolValue();
|
||||||
|
|
||||||
// What we'll draw on
|
// What we'll draw on
|
||||||
PaintingArea* paintingArea;
|
PaintingArea* paintingArea;
|
||||||
|
|
||||||
|
const QSize Buttonsize = QSize(70,70);
|
||||||
|
QPixmap p;
|
||||||
|
QPushButton* CircleButton;
|
||||||
|
QPushButton* FloodFillButton;
|
||||||
|
QPushButton* LineButton;
|
||||||
|
QPushButton* PenButton;
|
||||||
|
QPushButton* PlainButton;
|
||||||
|
QPushButton* PolygonButton;
|
||||||
|
QPushButton* RectangleButton;
|
||||||
|
QLabel* WidthLine;
|
||||||
|
QLabel* innerAlphaLine;
|
||||||
|
QLineEdit* EditLineWidth;
|
||||||
|
QLineEdit* EditLineInnerAlpha;
|
||||||
|
QIntValidator* ValidatorLineWidth;
|
||||||
|
QIntValidator* ValidatorInnerAlpha;
|
||||||
|
|
||||||
|
QPushButton* FirstColorButton;
|
||||||
|
QPushButton* SecondColorButton;
|
||||||
|
QPushButton* SwitchColorButton;
|
||||||
|
|
||||||
|
QLabel* ActiveLayerLine;
|
||||||
|
QPushButton* ActiveLayerImageButton;
|
||||||
|
|
||||||
// The menu widgets
|
// The menu widgets
|
||||||
QMenu*saveAsMenu;
|
QMenu*saveAsMenu;
|
||||||
QMenu*fileMenu;
|
QMenu*fileMenu;
|
||||||
@@ -135,7 +168,7 @@ QList<QAction*> actionSaveAs;
|
|||||||
|
|
||||||
// main GUI elements
|
// main GUI elements
|
||||||
QWidget* centralGuiWidget;
|
QWidget* centralGuiWidget;
|
||||||
QGridLayout*mainLayout;
|
QGridLayout* mainLayout;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -81,3 +81,7 @@ void IntelliImage::drawPlain(const QColor& color){
|
|||||||
QColor IntelliImage::getPixelColor(QPoint& point){
|
QColor IntelliImage::getPixelColor(QPoint& point){
|
||||||
return imageData.pixelColor(point);
|
return imageData.pixelColor(point);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QImage IntelliImage::getImageData(){
|
||||||
|
return imageData;
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "IntelliHelper/IntelliHelper.h"
|
#include "IntelliHelper/IntelliRenderSettings.h"
|
||||||
|
#include "IntelliHelper/IntelliTriangulation.h"
|
||||||
|
|
||||||
class IntelliTool;
|
class IntelliTool;
|
||||||
|
|
||||||
@@ -140,6 +141,8 @@ virtual bool loadImage(const QString &filePath);
|
|||||||
* \return The color of the Pixel as QColor.
|
* \return The color of the Pixel as QColor.
|
||||||
*/
|
*/
|
||||||
virtual QColor getPixelColor(QPoint& point);
|
virtual QColor getPixelColor(QPoint& point);
|
||||||
|
|
||||||
|
QImage getImageData();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "Image/IntelliShapedImage.h"
|
#include "Image/IntelliShapedImage.h"
|
||||||
#include "IntelliHelper/IntelliHelper.h"
|
#include "IntelliHelper/IntelliTriangulation.h"
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QRect>
|
#include <QRect>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
@@ -42,7 +42,7 @@ void IntelliShapedImage::calculateVisiblity(){
|
|||||||
for(int x=0; x<imageData.width(); x++) {
|
for(int x=0; x<imageData.width(); x++) {
|
||||||
QPoint ptr(x,y);
|
QPoint ptr(x,y);
|
||||||
clr = imageData.pixelColor(x,y);
|
clr = imageData.pixelColor(x,y);
|
||||||
bool isInPolygon = IntelliHelper::isInPolygon(triangles, ptr);
|
bool isInPolygon = IntelliTriangulation::isInPolygon(triangles, ptr);
|
||||||
if(isInPolygon) {
|
if(isInPolygon) {
|
||||||
clr.setAlpha(std::min(255, clr.alpha()));
|
clr.setAlpha(std::min(255, clr.alpha()));
|
||||||
}else{
|
}else{
|
||||||
@@ -73,7 +73,7 @@ void IntelliShapedImage::setPolygon(const std::vector<QPoint>& polygonData){
|
|||||||
for(auto element:polygonData) {
|
for(auto element:polygonData) {
|
||||||
this->polygonData.push_back(QPoint(element.x(), element.y()));
|
this->polygonData.push_back(QPoint(element.x(), element.y()));
|
||||||
}
|
}
|
||||||
triangles = IntelliHelper::calculateTriangles(polygonData);
|
triangles = IntelliTriangulation::calculateTriangles(polygonData);
|
||||||
}
|
}
|
||||||
calculateVisiblity();
|
calculateVisiblity();
|
||||||
return;
|
return;
|
||||||
|
|||||||
10
src/IntelliHelper/IntelliRenderSettings.cpp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#include "IntelliRenderSettings.h"
|
||||||
|
|
||||||
|
IntelliRenderSettings::IntelliRenderSettings()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IntelliRenderSettings::getFastRenderer(){
|
||||||
|
return fastRenderer;
|
||||||
|
}
|
||||||
20
src/IntelliHelper/IntelliRenderSettings.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef INTELLIRENDERSETTINGS_H
|
||||||
|
#define INTELLIRENDERSETTINGS_H
|
||||||
|
|
||||||
|
|
||||||
|
class IntelliRenderSettings
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
IntelliRenderSettings();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The getfastRenderer gets the value of the flag for the fastRenderer setting.
|
||||||
|
* \return Returns true if fastRenderer is active else false
|
||||||
|
*/
|
||||||
|
bool getFastRenderer();
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool fastRenderer = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // INTELLIRENDERSETTINGS_H
|
||||||
53
src/IntelliHelper/IntelliToolsettings.cpp
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
#include "IntelliToolsettings.h"
|
||||||
|
#include <QInputDialog>
|
||||||
|
|
||||||
|
IntelliToolsettings::IntelliToolsettings()
|
||||||
|
{
|
||||||
|
lineWidth = 1;
|
||||||
|
innerAlpha = 255;
|
||||||
|
Linestyle = LineStyle::SOLID_LINE;
|
||||||
|
}
|
||||||
|
|
||||||
|
IntelliToolsettings::~IntelliToolsettings(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int IntelliToolsettings::getLineWidth(){
|
||||||
|
return lineWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IntelliToolsettings::setLineWidth(){
|
||||||
|
lineWidth = QInputDialog::getInt(nullptr,"Line Width Input", "Width",1,1,50,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IntelliToolsettings::setLineWidth(int LineWidth){
|
||||||
|
if(LineWidth < 1){
|
||||||
|
LineWidth = 1;
|
||||||
|
}
|
||||||
|
else if(LineWidth > 50){
|
||||||
|
LineWidth = 50;
|
||||||
|
}
|
||||||
|
lineWidth = LineWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
int IntelliToolsettings::getInnerAlpha(){
|
||||||
|
return this->innerAlpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IntelliToolsettings::setInnerAlpha(){
|
||||||
|
this->innerAlpha = QInputDialog::getInt(nullptr,"Inner Aplha Input", "Value",0,0,255,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IntelliToolsettings::setInnerAlpha(int innerAlpha){
|
||||||
|
if(innerAlpha < 0){
|
||||||
|
innerAlpha = 0;
|
||||||
|
}
|
||||||
|
else if(innerAlpha > 255){
|
||||||
|
innerAlpha = 255;
|
||||||
|
}
|
||||||
|
this->innerAlpha = innerAlpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
IntelliToolsettings::LineStyle IntelliToolsettings::getLinestyle(){
|
||||||
|
return Linestyle;
|
||||||
|
}
|
||||||
29
src/IntelliHelper/IntelliToolsettings.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#ifndef INTELLITOOLSETTINGS_H
|
||||||
|
#define INTELLITOOLSETTINGS_H
|
||||||
|
|
||||||
|
class IntelliToolsettings {
|
||||||
|
public:
|
||||||
|
/*!
|
||||||
|
* \brief The LineStyle enum classifing all ways of drawing a line.
|
||||||
|
*/
|
||||||
|
enum class LineStyle {
|
||||||
|
SOLID_LINE,
|
||||||
|
DOTTED_LINE
|
||||||
|
};
|
||||||
|
IntelliToolsettings();
|
||||||
|
virtual ~IntelliToolsettings();
|
||||||
|
int getLineWidth();
|
||||||
|
void setLineWidth();
|
||||||
|
void setLineWidth(int LineWidth);
|
||||||
|
int getInnerAlpha();
|
||||||
|
void setInnerAlpha();
|
||||||
|
void setInnerAlpha(int innerAlpha);
|
||||||
|
LineStyle getLinestyle();
|
||||||
|
|
||||||
|
private:
|
||||||
|
int lineWidth;
|
||||||
|
int innerAlpha;
|
||||||
|
LineStyle Linestyle;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // INTELLITOOLSETTINGS_H
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "IntelliHelper.h"
|
#include "IntelliTriangulation.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#define pi 3.1415926535897932384626433832795
|
#define pi 3.1415926535897932384626433832795
|
||||||
|
|
||||||
std::vector<Triangle> IntelliHelper::calculateTriangles(std::vector<QPoint> polyPoints){
|
std::vector<Triangle> IntelliTriangulation::calculateTriangles(std::vector<QPoint> polyPoints){
|
||||||
// helper for managing the triangle vertices and their state
|
// helper for managing the triangle vertices and their state
|
||||||
struct TriangleHelper {
|
struct TriangleHelper {
|
||||||
QPoint vertex;
|
QPoint vertex;
|
||||||
@@ -113,9 +113,9 @@ std::vector<Triangle> IntelliHelper::calculateTriangles(std::vector<QPoint> poly
|
|||||||
return Triangles;
|
return Triangles;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IntelliHelper::isInPolygon(std::vector<Triangle> &triangles, QPoint &point){
|
bool IntelliTriangulation::isInPolygon(std::vector<Triangle> &triangles, QPoint &point){
|
||||||
for(auto triangle : triangles) {
|
for(auto triangle : triangles) {
|
||||||
if(IntelliHelper::isInTriangle(triangle, point)) {
|
if(IntelliTriangulation::isInTriangle(triangle, point)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef INTELLIHELPER_H
|
#ifndef INTELLITRIANGULATION_H
|
||||||
#define INTELLIHELPER_H
|
#define INTELLITRIANGULATION_H
|
||||||
|
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -11,7 +11,7 @@ struct Triangle {
|
|||||||
QPoint A,B,C;
|
QPoint A,B,C;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace IntelliHelper {
|
namespace IntelliTriangulation {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief A function to get the 2*area of a traingle, using its determinat.
|
* \brief A function to get the 2*area of a traingle, using its determinat.
|
||||||
@@ -34,9 +34,9 @@ inline bool isInTriangle(Triangle& tri, QPoint& P){
|
|||||||
float val1, val2, val3;
|
float val1, val2, val3;
|
||||||
bool neg, pos;
|
bool neg, pos;
|
||||||
|
|
||||||
val1 = IntelliHelper::sign(P,tri.A,tri.B);
|
val1 = IntelliTriangulation::sign(P,tri.A,tri.B);
|
||||||
val2 = IntelliHelper::sign(P,tri.B,tri.C);
|
val2 = IntelliTriangulation::sign(P,tri.B,tri.C);
|
||||||
val3 = IntelliHelper::sign(P,tri.C,tri.A);
|
val3 = IntelliTriangulation::sign(P,tri.C,tri.A);
|
||||||
|
|
||||||
neg = (val1<0.f) || (val2<0.f) || (val3<0.f);
|
neg = (val1<0.f) || (val2<0.f) || (val3<0.f);
|
||||||
pos = (val1>0.f) || (val2>0.f) || (val3>0.f);
|
pos = (val1>0.f) || (val2>0.f) || (val3>0.f);
|
||||||
@@ -21,7 +21,9 @@ SOURCES += \
|
|||||||
Image/IntelliRasterImage.cpp \
|
Image/IntelliRasterImage.cpp \
|
||||||
Image/IntelliShapedImage.cpp \
|
Image/IntelliShapedImage.cpp \
|
||||||
IntelliHelper/IntelliColorPicker.cpp \
|
IntelliHelper/IntelliColorPicker.cpp \
|
||||||
IntelliHelper/IntelliHelper.cpp \
|
IntelliHelper/IntelliRenderSettings.cpp \
|
||||||
|
IntelliHelper/IntelliToolsettings.cpp \
|
||||||
|
IntelliHelper/IntelliTriangulation.cpp \
|
||||||
Layer/PaintingArea.cpp \
|
Layer/PaintingArea.cpp \
|
||||||
Tool/IntelliTool.cpp \
|
Tool/IntelliTool.cpp \
|
||||||
Tool/IntelliToolCircle.cpp \
|
Tool/IntelliToolCircle.cpp \
|
||||||
@@ -39,7 +41,9 @@ HEADERS += \
|
|||||||
Image/IntelliRasterImage.h \
|
Image/IntelliRasterImage.h \
|
||||||
Image/IntelliShapedImage.h \
|
Image/IntelliShapedImage.h \
|
||||||
IntelliHelper/IntelliColorPicker.h \
|
IntelliHelper/IntelliColorPicker.h \
|
||||||
IntelliHelper/IntelliHelper.h \
|
IntelliHelper/IntelliRenderSettings.h \
|
||||||
|
IntelliHelper/IntelliToolsettings.h \
|
||||||
|
IntelliHelper/IntelliTriangulation.h \
|
||||||
Layer/PaintingArea.h \
|
Layer/PaintingArea.h \
|
||||||
Tool/IntelliTool.h \
|
Tool/IntelliTool.h \
|
||||||
Tool/IntelliToolCircle.h \
|
Tool/IntelliToolCircle.h \
|
||||||
@@ -63,3 +67,6 @@ ICON = icon.icns
|
|||||||
qnx: target.path = /tmp/$${TARGET}/bin
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
!isEmpty(target.path): INSTALLS += target
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
Bilder.qrc
|
||||||
|
|||||||
@@ -66,14 +66,15 @@ int PaintingArea::addLayer(int width, int height, int widthOffset, int heightOff
|
|||||||
}
|
}
|
||||||
newLayer.alpha = 255;
|
newLayer.alpha = 255;
|
||||||
this->layerBundle.push_back(newLayer);
|
this->layerBundle.push_back(newLayer);
|
||||||
return static_cast<int>(layerBundle.size())-1;
|
activeLayer = static_cast<int>(layerBundle.size())-1;
|
||||||
|
return activeLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PaintingArea::deleteLayer(int index){
|
void PaintingArea::deleteLayer(int index){
|
||||||
if(index<static_cast<int>(layerBundle.size())) {
|
if(index<static_cast<int>(layerBundle.size())) {
|
||||||
this->layerBundle.erase(layerBundle.begin()+index);
|
this->layerBundle.erase(layerBundle.begin()+index);
|
||||||
if(activeLayer>=index) {
|
if(activeLayer>=index && activeLayer != 0) {
|
||||||
activeLayer--;
|
activeLayer--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -145,10 +146,12 @@ void PaintingArea::floodFill(int r, int g, int b, int a){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::movePositionActive(int x, int y){
|
void PaintingArea::movePositionActive(int x, int y){
|
||||||
if(Tool->getIsDrawing()){
|
if(Tool!=nullptr){
|
||||||
IntelliTool* temp = copyActiveTool();
|
if(Tool->getIsDrawing()){
|
||||||
delete this->Tool;
|
IntelliTool* temp = copyActiveTool();
|
||||||
this->Tool = temp;
|
delete this->Tool;
|
||||||
|
this->Tool = temp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
layerBundle[static_cast<size_t>(activeLayer)].widthOffset += x;
|
layerBundle[static_cast<size_t>(activeLayer)].widthOffset += x;
|
||||||
layerBundle[static_cast<size_t>(activeLayer)].heightOffset += y;
|
layerBundle[static_cast<size_t>(activeLayer)].heightOffset += y;
|
||||||
@@ -168,10 +171,12 @@ void PaintingArea::moveActiveLayer(int idx){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::slotActivateLayer(int a){
|
void PaintingArea::slotActivateLayer(int a){
|
||||||
if(Tool->getIsDrawing()){
|
if(Tool != nullptr){
|
||||||
IntelliTool* temp = copyActiveTool();
|
if(Tool->getIsDrawing()){
|
||||||
delete this->Tool;
|
IntelliTool* temp = copyActiveTool();
|
||||||
this->Tool = temp;
|
delete this->Tool;
|
||||||
|
this->Tool = temp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(a>=0 && a < static_cast<int>(layerBundle.size())) {
|
if(a>=0 && a < static_cast<int>(layerBundle.size())) {
|
||||||
this->setLayerActive(a);
|
this->setLayerActive(a);
|
||||||
@@ -194,36 +199,36 @@ void PaintingArea::colorPickerSwapColors(){
|
|||||||
|
|
||||||
void PaintingArea::createPenTool(){
|
void PaintingArea::createPenTool(){
|
||||||
delete this->Tool;
|
delete this->Tool;
|
||||||
Tool = new IntelliToolPen(this, &colorPicker);
|
Tool = new IntelliToolPen(this, &colorPicker, &Toolsettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::createPlainTool(){
|
void PaintingArea::createPlainTool(){
|
||||||
delete this->Tool;
|
delete this->Tool;
|
||||||
Tool = new IntelliToolPlainTool(this, &colorPicker);
|
Tool = new IntelliToolPlainTool(this, &colorPicker, &Toolsettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::createLineTool(){
|
void PaintingArea::createLineTool(){
|
||||||
delete this->Tool;
|
delete this->Tool;
|
||||||
Tool = new IntelliToolLine(this, &colorPicker);
|
Tool = new IntelliToolLine(this, &colorPicker, &Toolsettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::createRectangleTool(){
|
void PaintingArea::createRectangleTool(){
|
||||||
delete this->Tool;
|
delete this->Tool;
|
||||||
Tool = new IntelliToolRectangle(this, &colorPicker);
|
Tool = new IntelliToolRectangle(this, &colorPicker, &Toolsettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::createCircleTool(){
|
void PaintingArea::createCircleTool(){
|
||||||
delete this->Tool;
|
delete this->Tool;
|
||||||
Tool = new IntelliToolCircle(this, &colorPicker);
|
Tool = new IntelliToolCircle(this, &colorPicker, &Toolsettings);
|
||||||
}
|
}
|
||||||
void PaintingArea::createPolygonTool(){
|
void PaintingArea::createPolygonTool(){
|
||||||
delete this->Tool;
|
delete this->Tool;
|
||||||
Tool = new IntelliToolPolygon(this, &colorPicker);
|
Tool = new IntelliToolPolygon(this, &colorPicker, &Toolsettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::createFloodFillTool(){
|
void PaintingArea::createFloodFillTool(){
|
||||||
delete this->Tool;
|
delete this->Tool;
|
||||||
Tool = new IntelliToolFloodFill(this, &colorPicker);
|
Tool = new IntelliToolFloodFill(this, &colorPicker, &Toolsettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
int PaintingArea::getWidthOfActive(){
|
int PaintingArea::getWidthOfActive(){
|
||||||
@@ -381,13 +386,21 @@ void PaintingArea::createTempTopLayer(int idx){
|
|||||||
|
|
||||||
IntelliTool* PaintingArea::copyActiveTool(){
|
IntelliTool* PaintingArea::copyActiveTool(){
|
||||||
switch(Tool->getTooltype()){
|
switch(Tool->getTooltype()){
|
||||||
case IntelliTool::Tooltype::CIRCLE: return new IntelliToolCircle(this,&colorPicker);
|
case IntelliTool::Tooltype::CIRCLE: return new IntelliToolCircle(this,&colorPicker, &Toolsettings);
|
||||||
case IntelliTool::Tooltype::FLOODFILL: return new IntelliToolFloodFill(this,&colorPicker);
|
case IntelliTool::Tooltype::FLOODFILL: return new IntelliToolFloodFill(this,&colorPicker, &Toolsettings);
|
||||||
case IntelliTool::Tooltype::LINE: return new IntelliToolLine(this,&colorPicker);
|
case IntelliTool::Tooltype::LINE: return new IntelliToolLine(this,&colorPicker, &Toolsettings);
|
||||||
case IntelliTool::Tooltype::PEN: return new IntelliToolPen(this,&colorPicker);
|
case IntelliTool::Tooltype::PEN: return new IntelliToolPen(this,&colorPicker, &Toolsettings);
|
||||||
case IntelliTool::Tooltype::PLAIN: return new IntelliToolPlainTool(this,&colorPicker);
|
case IntelliTool::Tooltype::PLAIN: return new IntelliToolPlainTool(this,&colorPicker, &Toolsettings);
|
||||||
case IntelliTool::Tooltype::POLYGON: return new IntelliToolPolygon(this,&colorPicker);
|
case IntelliTool::Tooltype::POLYGON: return new IntelliToolPolygon(this,&colorPicker, &Toolsettings);
|
||||||
case IntelliTool::Tooltype::RECTANGLE: return new IntelliToolRectangle(this,&colorPicker);
|
case IntelliTool::Tooltype::RECTANGLE: return new IntelliToolRectangle(this,&colorPicker, &Toolsettings);
|
||||||
default: return nullptr;
|
default: return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int PaintingArea::getNumberOfActiveLayer(){
|
||||||
|
return activeLayer;
|
||||||
|
}
|
||||||
|
|
||||||
|
IntelliImage* PaintingArea::getImageOfActiveLayer(){
|
||||||
|
return layerBundle[activeLayer].image;
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
#include "GUI/IntelliPhotoGui.h"
|
||||||
#include "Image/IntelliImage.h"
|
#include "Image/IntelliImage.h"
|
||||||
#include "Image/IntelliRasterImage.h"
|
#include "Image/IntelliRasterImage.h"
|
||||||
#include "Image/IntelliShapedImage.h"
|
#include "Image/IntelliShapedImage.h"
|
||||||
@@ -40,6 +41,7 @@ class PaintingArea : public QWidget
|
|||||||
// QObjects handle events
|
// QObjects handle events
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
friend IntelliTool;
|
friend IntelliTool;
|
||||||
|
friend IntelliPhotoGui;
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
* \brief PaintingArea is the constructor of the PaintingArea class, which initiates the working environment
|
* \brief PaintingArea is the constructor of the PaintingArea class, which initiates the working environment
|
||||||
@@ -165,6 +167,13 @@ public:
|
|||||||
|
|
||||||
std::vector<QPoint> getPolygonDataOfRealLayer();
|
std::vector<QPoint> getPolygonDataOfRealLayer();
|
||||||
|
|
||||||
|
int getNumberOfActiveLayer();
|
||||||
|
|
||||||
|
IntelliImage* getImageOfActiveLayer();
|
||||||
|
|
||||||
|
IntelliToolsettings Toolsettings;
|
||||||
|
IntelliColorPicker colorPicker;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// Events to handle
|
// Events to handle
|
||||||
/*!
|
/*!
|
||||||
@@ -200,8 +209,9 @@ private:
|
|||||||
int maxWidth;
|
int maxWidth;
|
||||||
int maxHeight;
|
int maxHeight;
|
||||||
|
|
||||||
|
IntelliRenderSettings renderSettings;
|
||||||
IntelliTool* Tool;
|
IntelliTool* Tool;
|
||||||
IntelliColorPicker colorPicker;
|
IntelliPhotoGui* DumpyGui;
|
||||||
|
|
||||||
std::vector<LayerObject> layerBundle;
|
std::vector<LayerObject> layerBundle;
|
||||||
int activeLayer=-1;
|
int activeLayer=-1;
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
#include "IntelliTool.h"
|
#include "IntelliTool.h"
|
||||||
#include "Layer/PaintingArea.h"
|
#include "Layer/PaintingArea.h"
|
||||||
|
|
||||||
IntelliTool::IntelliTool(PaintingArea* Area, IntelliColorPicker* colorPicker){
|
IntelliTool::IntelliTool(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings){
|
||||||
this->Area=Area;
|
this->Area=Area;
|
||||||
this->colorPicker=colorPicker;
|
this->colorPicker=colorPicker;
|
||||||
|
this->Toolsettings=Toolsettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -73,6 +74,7 @@ void IntelliTool::mergeToolLayer(){
|
|||||||
activeLayer->image->imageData.setPixelColor(x, y, clr_0);
|
activeLayer->image->imageData.setPixelColor(x, y, clr_0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Area->DumpyGui->UpdateGui();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliTool::deleteToolLayer(){
|
void IntelliTool::deleteToolLayer(){
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#define Intelli_Tool_H
|
#define Intelli_Tool_H
|
||||||
|
|
||||||
#include "IntelliHelper/IntelliColorPicker.h"
|
#include "IntelliHelper/IntelliColorPicker.h"
|
||||||
|
#include "IntelliHelper/IntelliToolsettings.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
struct LayerObject;
|
struct LayerObject;
|
||||||
@@ -49,6 +50,8 @@ Tooltype ActiveType;
|
|||||||
*/
|
*/
|
||||||
IntelliColorPicker* colorPicker;
|
IntelliColorPicker* colorPicker;
|
||||||
|
|
||||||
|
IntelliToolsettings* Toolsettings;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief A pointer to the underlying active Layer, do not work on this. This is used for data grabbing or previews.
|
* \brief A pointer to the underlying active Layer, do not work on this. This is used for data grabbing or previews.
|
||||||
*/
|
*/
|
||||||
@@ -70,7 +73,7 @@ public:
|
|||||||
* \param Area - The general PaintingArea used by the project.
|
* \param Area - The general PaintingArea used by the project.
|
||||||
* \param colorPicker - The general colorPicker used by the project.
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
*/
|
*/
|
||||||
IntelliTool(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliTool(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief An abstract Destructor.
|
* \brief An abstract Destructor.
|
||||||
|
|||||||
@@ -3,10 +3,8 @@
|
|||||||
#include "QInputDialog"
|
#include "QInputDialog"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
IntelliToolCircle::IntelliToolCircle(PaintingArea* Area, IntelliColorPicker* colorPicker)
|
IntelliToolCircle::IntelliToolCircle(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings)
|
||||||
: IntelliTool(Area, colorPicker){
|
: IntelliTool(Area, colorPicker, Toolsettings){
|
||||||
this->innerAlpha = QInputDialog::getInt(nullptr,"Inner Alpha Value", "Value:", 0,0,255,1);
|
|
||||||
this->borderWidth = QInputDialog::getInt(nullptr,"Outer edge width", "Value:", 0,1,255,1);
|
|
||||||
this->ActiveType = Tooltype::CIRCLE;
|
this->ActiveType = Tooltype::CIRCLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,7 +15,7 @@ IntelliToolCircle::~IntelliToolCircle(){
|
|||||||
void IntelliToolCircle::drawCircle(int radius){
|
void IntelliToolCircle::drawCircle(int radius){
|
||||||
int outer = radius+20;
|
int outer = radius+20;
|
||||||
QColor inner = this->colorPicker->getSecondColor();
|
QColor inner = this->colorPicker->getSecondColor();
|
||||||
inner.setAlpha(innerAlpha);
|
inner.setAlpha(Toolsettings->getInnerAlpha());
|
||||||
int yMin, yMax, xMin, xMax;
|
int yMin, yMax, xMin, xMax;
|
||||||
yMin = centerPoint.y()-radius;
|
yMin = centerPoint.y()-radius;
|
||||||
yMax = centerPoint.y()+radius;
|
yMax = centerPoint.y()+radius;
|
||||||
@@ -29,14 +27,14 @@ void IntelliToolCircle::drawCircle(int radius){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO implement circle drawing algorithm bresenham
|
//TODO implement circle drawing algorithm bresenham
|
||||||
radius = static_cast<int>(radius +(this->borderWidth/2.)-1.);
|
radius = static_cast<int>(radius +(Toolsettings->getLineWidth()/2.)-1.);
|
||||||
yMin = (centerPoint.y()-radius);
|
yMin = (centerPoint.y()-radius);
|
||||||
yMax = (centerPoint.y()+radius);
|
yMax = (centerPoint.y()+radius);
|
||||||
for(int i=yMin; i<=yMax; i++) {
|
for(int i=yMin; i<=yMax; i++) {
|
||||||
xMin = static_cast<int>(centerPoint.x()-sqrt(pow(radius,2)-pow(i-centerPoint.y(),2)));
|
xMin = static_cast<int>(centerPoint.x()-sqrt(pow(radius,2)-pow(i-centerPoint.y(),2)));
|
||||||
xMax = static_cast<int>(centerPoint.x()+sqrt(pow(radius,2)-pow(i-centerPoint.y(),2)));
|
xMax = static_cast<int>(centerPoint.x()+sqrt(pow(radius,2)-pow(i-centerPoint.y(),2)));
|
||||||
this->Canvas->image->drawPoint(QPoint(xMin,i), colorPicker->getFirstColor(),borderWidth);
|
this->Canvas->image->drawPoint(QPoint(xMin,i), colorPicker->getFirstColor(),Toolsettings->getLineWidth());
|
||||||
this->Canvas->image->drawPoint(QPoint(xMax,i), colorPicker->getFirstColor(),borderWidth);
|
this->Canvas->image->drawPoint(QPoint(xMax,i), colorPicker->getFirstColor(),Toolsettings->getLineWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
xMin = (centerPoint.x()-radius);
|
xMin = (centerPoint.x()-radius);
|
||||||
@@ -44,8 +42,8 @@ void IntelliToolCircle::drawCircle(int radius){
|
|||||||
for(int i=xMin; i<=xMax; i++) {
|
for(int i=xMin; i<=xMax; i++) {
|
||||||
int yMin = static_cast<int>(centerPoint.y()-sqrt(pow(radius,2)-pow(i-centerPoint.x(),2)));
|
int yMin = static_cast<int>(centerPoint.y()-sqrt(pow(radius,2)-pow(i-centerPoint.x(),2)));
|
||||||
int yMax = static_cast<int>(centerPoint.y()+sqrt(pow(radius,2)-pow(i-centerPoint.x(),2)));
|
int yMax = static_cast<int>(centerPoint.y()+sqrt(pow(radius,2)-pow(i-centerPoint.x(),2)));
|
||||||
this->Canvas->image->drawPoint(QPoint(i, yMin), colorPicker->getFirstColor(),borderWidth);
|
this->Canvas->image->drawPoint(QPoint(i, yMin), colorPicker->getFirstColor(),Toolsettings->getLineWidth());
|
||||||
this->Canvas->image->drawPoint(QPoint(i, yMax), colorPicker->getFirstColor(),borderWidth);
|
this->Canvas->image->drawPoint(QPoint(i, yMax), colorPicker->getFirstColor(),Toolsettings->getLineWidth());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,10 +69,7 @@ void IntelliToolCircle::onMouseLeftReleased(int x, int y){
|
|||||||
|
|
||||||
void IntelliToolCircle::onWheelScrolled(int value){
|
void IntelliToolCircle::onWheelScrolled(int value){
|
||||||
IntelliTool::onWheelScrolled(value);
|
IntelliTool::onWheelScrolled(value);
|
||||||
this->borderWidth+=value;
|
Toolsettings->setLineWidth(Toolsettings->getLineWidth()+value);
|
||||||
if(this->borderWidth<=0) {
|
|
||||||
this->borderWidth=1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliToolCircle::onMouseMoved(int x, int y){
|
void IntelliToolCircle::onMouseMoved(int x, int y){
|
||||||
|
|||||||
@@ -19,22 +19,13 @@ void drawCircle(int radius);
|
|||||||
*/
|
*/
|
||||||
QPoint centerPoint;
|
QPoint centerPoint;
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief The alpha value of the inner circle.
|
|
||||||
*/
|
|
||||||
int innerAlpha;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief The width of the outer circle edge.
|
|
||||||
*/
|
|
||||||
int borderWidth;
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
* \brief A constructor setting the general paintingArea and colorPicker. And reading in the inner alpha and edgeWidth.
|
* \brief A constructor setting the general paintingArea and colorPicker. And reading in the inner alpha and edgeWidth.
|
||||||
* \param Area - The general paintingArea used by the project.
|
* \param Area - The general paintingArea used by the project.
|
||||||
* \param colorPicker - The general colorPicker used by the project.
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
*/
|
*/
|
||||||
IntelliToolCircle(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliToolCircle(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief A Destructor.
|
* \brief A Destructor.
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
IntelliToolFloodFill::IntelliToolFloodFill(PaintingArea* Area, IntelliColorPicker* colorPicker)
|
IntelliToolFloodFill::IntelliToolFloodFill(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings)
|
||||||
: IntelliTool(Area, colorPicker){
|
: IntelliTool(Area, colorPicker, Toolsettings){
|
||||||
this->ActiveType = Tooltype::FLOODFILL;
|
this->ActiveType = Tooltype::FLOODFILL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public:
|
|||||||
* \param Area - The general paintingArea used by the project.
|
* \param Area - The general paintingArea used by the project.
|
||||||
* \param colorPicker - The general colorPicker used by the project.
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
*/
|
*/
|
||||||
IntelliToolFloodFill(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliToolFloodFill(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief A Destructor.
|
* \brief A Destructor.
|
||||||
|
|||||||
@@ -3,12 +3,9 @@
|
|||||||
#include "QColorDialog"
|
#include "QColorDialog"
|
||||||
#include "QInputDialog"
|
#include "QInputDialog"
|
||||||
|
|
||||||
IntelliToolLine::IntelliToolLine(PaintingArea* Area, IntelliColorPicker* colorPicker)
|
IntelliToolLine::IntelliToolLine(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings)
|
||||||
: IntelliTool(Area, colorPicker){
|
: IntelliTool(Area, colorPicker, Toolsettings){
|
||||||
this->lineWidth = QInputDialog::getInt(nullptr,"Line Width Input", "Width",1,1,50,1);
|
|
||||||
this->ActiveType = Tooltype::LINE;
|
this->ActiveType = Tooltype::LINE;
|
||||||
//create checkbox or scroll dialog to get line style
|
|
||||||
this->lineStyle = LineStyle::SOLID_LINE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IntelliToolLine::~IntelliToolLine(){
|
IntelliToolLine::~IntelliToolLine(){
|
||||||
@@ -26,7 +23,7 @@ void IntelliToolLine::onMouseRightReleased(int x, int y){
|
|||||||
void IntelliToolLine::onMouseLeftPressed(int x, int y){
|
void IntelliToolLine::onMouseLeftPressed(int x, int y){
|
||||||
IntelliTool::onMouseLeftPressed(x,y);
|
IntelliTool::onMouseLeftPressed(x,y);
|
||||||
this->lineStartingPoint=QPoint(x,y);
|
this->lineStartingPoint=QPoint(x,y);
|
||||||
this->Canvas->image->drawPoint(lineStartingPoint, colorPicker->getFirstColor(),lineWidth);
|
this->Canvas->image->drawPoint(lineStartingPoint, colorPicker->getFirstColor(),Toolsettings->getLineWidth());
|
||||||
Canvas->image->calculateVisiblity();
|
Canvas->image->calculateVisiblity();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,21 +33,18 @@ void IntelliToolLine::onMouseLeftReleased(int x, int y){
|
|||||||
|
|
||||||
void IntelliToolLine::onWheelScrolled(int value){
|
void IntelliToolLine::onWheelScrolled(int value){
|
||||||
IntelliTool::onWheelScrolled(value);
|
IntelliTool::onWheelScrolled(value);
|
||||||
this->lineWidth+=value;
|
Toolsettings->setLineWidth(Toolsettings->getLineWidth()+value);
|
||||||
if(this->lineWidth<=0) {
|
|
||||||
this->lineWidth=1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliToolLine::onMouseMoved(int x, int y){
|
void IntelliToolLine::onMouseMoved(int x, int y){
|
||||||
if(this->isDrawing) {
|
if(this->isDrawing) {
|
||||||
this->Canvas->image->drawPlain(Qt::transparent);
|
this->Canvas->image->drawPlain(Qt::transparent);
|
||||||
QPoint next(x,y);
|
QPoint next(x,y);
|
||||||
switch(lineStyle) {
|
switch(Toolsettings->getLinestyle()) {
|
||||||
case LineStyle::SOLID_LINE:
|
case IntelliToolsettings::LineStyle::SOLID_LINE:
|
||||||
this->Canvas->image->drawLine(lineStartingPoint,next,colorPicker->getFirstColor(),lineWidth);
|
this->Canvas->image->drawLine(lineStartingPoint,next,colorPicker->getFirstColor(),Toolsettings->getLineWidth());
|
||||||
break;
|
break;
|
||||||
case LineStyle::DOTTED_LINE:
|
case IntelliToolsettings::LineStyle::DOTTED_LINE:
|
||||||
QPoint p1 =lineStartingPoint.x() <= next.x() ? lineStartingPoint : next;
|
QPoint p1 =lineStartingPoint.x() <= next.x() ? lineStartingPoint : next;
|
||||||
QPoint p2 =lineStartingPoint.x() < next.x() ? next : lineStartingPoint;
|
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 m = static_cast<int>(static_cast<float>(p2.y()-p1.y())/static_cast<float>(p2.x()-p1.x())+0.5f);
|
||||||
|
|||||||
@@ -4,14 +4,6 @@
|
|||||||
|
|
||||||
#include "QPoint"
|
#include "QPoint"
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief The LineStyle enum classifing all ways of drawing a line.
|
|
||||||
*/
|
|
||||||
enum class LineStyle {
|
|
||||||
SOLID_LINE,
|
|
||||||
DOTTED_LINE
|
|
||||||
};
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The IntelliToolFloodFill class represents a tool to draw a line.
|
* \brief The IntelliToolFloodFill class represents a tool to draw a line.
|
||||||
*/
|
*/
|
||||||
@@ -21,15 +13,6 @@ class IntelliToolLine : public IntelliTool {
|
|||||||
*/
|
*/
|
||||||
QPoint lineStartingPoint;
|
QPoint lineStartingPoint;
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief The width of the line to draw.
|
|
||||||
*/
|
|
||||||
int lineWidth;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief The style of the line. Apropriate to LineStyle.
|
|
||||||
*/
|
|
||||||
LineStyle lineStyle;
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -37,7 +20,7 @@ public:
|
|||||||
* \param Area - The general paintingArea used by the project.
|
* \param Area - The general paintingArea used by the project.
|
||||||
* \param colorPicker - The general colorPicker used by the project.
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
*/
|
*/
|
||||||
IntelliToolLine(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliToolLine(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief An abstract Destructor.
|
* \brief An abstract Destructor.
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
#include "QColorDialog"
|
#include "QColorDialog"
|
||||||
#include "QInputDialog"
|
#include "QInputDialog"
|
||||||
|
|
||||||
IntelliToolPen::IntelliToolPen(PaintingArea* Area, IntelliColorPicker* colorPicker)
|
IntelliToolPen::IntelliToolPen(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings)
|
||||||
: IntelliTool(Area, colorPicker){
|
: IntelliTool(Area, colorPicker, Toolsettings){
|
||||||
this->penWidth = QInputDialog::getInt(nullptr, "Pen width", "Width:", 1,0, 50, 1);
|
|
||||||
this->ActiveType = Tooltype::PEN;
|
this->ActiveType = Tooltype::PEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,7 +24,7 @@ void IntelliToolPen::onMouseRightReleased(int x, int y){
|
|||||||
void IntelliToolPen::onMouseLeftPressed(int x, int y){
|
void IntelliToolPen::onMouseLeftPressed(int x, int y){
|
||||||
IntelliTool::onMouseLeftPressed(x,y);
|
IntelliTool::onMouseLeftPressed(x,y);
|
||||||
this->previousPoint=QPoint(x,y);
|
this->previousPoint=QPoint(x,y);
|
||||||
this->Canvas->image->drawPoint(previousPoint, colorPicker->getFirstColor(), penWidth);
|
this->Canvas->image->drawPoint(previousPoint, colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
Canvas->image->calculateVisiblity();
|
Canvas->image->calculateVisiblity();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +35,7 @@ void IntelliToolPen::onMouseLeftReleased(int x, int y){
|
|||||||
void IntelliToolPen::onMouseMoved(int x, int y){
|
void IntelliToolPen::onMouseMoved(int x, int y){
|
||||||
if(this->isDrawing) {
|
if(this->isDrawing) {
|
||||||
QPoint newPoint(x,y);
|
QPoint newPoint(x,y);
|
||||||
this->Canvas->image->drawLine(this->previousPoint, newPoint, colorPicker->getFirstColor(), penWidth);
|
this->Canvas->image->drawLine(this->previousPoint, newPoint, colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
this->previousPoint=newPoint;
|
this->previousPoint=newPoint;
|
||||||
}
|
}
|
||||||
IntelliTool::onMouseMoved(x,y);
|
IntelliTool::onMouseMoved(x,y);
|
||||||
@@ -44,8 +43,5 @@ void IntelliToolPen::onMouseMoved(int x, int y){
|
|||||||
|
|
||||||
void IntelliToolPen::onWheelScrolled(int value){
|
void IntelliToolPen::onWheelScrolled(int value){
|
||||||
IntelliTool::onWheelScrolled(value);
|
IntelliTool::onWheelScrolled(value);
|
||||||
this->penWidth+=value;
|
Toolsettings->setLineWidth(Toolsettings->getLineWidth()+value);
|
||||||
if(this->penWidth<=0) {
|
|
||||||
this->penWidth=1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,6 @@
|
|||||||
* \brief The IntelliToolPen class represents a tool to draw a line.
|
* \brief The IntelliToolPen class represents a tool to draw a line.
|
||||||
*/
|
*/
|
||||||
class IntelliToolPen : public IntelliTool {
|
class IntelliToolPen : public IntelliTool {
|
||||||
/*!
|
|
||||||
* \brief penWidth - The width of the Pen while drawing.
|
|
||||||
*/
|
|
||||||
int penWidth;
|
|
||||||
/*!
|
/*!
|
||||||
* \brief point - Represents the previous point to help drawing a line.
|
* \brief point - Represents the previous point to help drawing a line.
|
||||||
*/
|
*/
|
||||||
@@ -23,7 +19,7 @@ public:
|
|||||||
* \param Area - The general PaintingArea used by the project.
|
* \param Area - The general PaintingArea used by the project.
|
||||||
* \param colorPicker - The general colorPicker used by the project.
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
*/
|
*/
|
||||||
IntelliToolPen(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliToolPen(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings);
|
||||||
/*!
|
/*!
|
||||||
* \brief A Destructor.
|
* \brief A Destructor.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
#include "Layer/PaintingArea.h"
|
#include "Layer/PaintingArea.h"
|
||||||
#include "QColorDialog"
|
#include "QColorDialog"
|
||||||
|
|
||||||
IntelliToolPlainTool::IntelliToolPlainTool(PaintingArea* Area, IntelliColorPicker* colorPicker)
|
IntelliToolPlainTool::IntelliToolPlainTool(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings)
|
||||||
: IntelliTool(Area, colorPicker){
|
: IntelliTool(Area, colorPicker, Toolsettings){
|
||||||
this->ActiveType = Tooltype::PLAIN;
|
this->ActiveType = Tooltype::PLAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public:
|
|||||||
* \param Area - The general paintingArea used by the project.
|
* \param Area - The general paintingArea used by the project.
|
||||||
* \param colorPicker - The general colorPicker used by the project.
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
*/
|
*/
|
||||||
IntelliToolPlainTool(PaintingArea*Area, IntelliColorPicker* colorPicker);
|
IntelliToolPlainTool(PaintingArea*Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings);
|
||||||
/*!
|
/*!
|
||||||
* \brief A Destructor.
|
* \brief A Destructor.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
IntelliToolPolygon::IntelliToolPolygon(PaintingArea* Area, IntelliColorPicker* colorPicker)
|
IntelliToolPolygon::IntelliToolPolygon(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings)
|
||||||
: IntelliTool(Area, colorPicker){
|
: IntelliTool(Area, colorPicker, Toolsettings){
|
||||||
this->innerAlpha = QInputDialog::getInt(nullptr,"Inner Alpha Value", "Value:", 255,0,255,1);
|
|
||||||
lineWidth = QInputDialog::getInt(nullptr,"Line Width Input", "Width",5,1,10,1);
|
|
||||||
isPointNearStart = false;
|
isPointNearStart = false;
|
||||||
isDrawing = false;
|
isDrawing = false;
|
||||||
isInside = false;
|
isInside = false;
|
||||||
@@ -22,9 +20,9 @@ IntelliToolPolygon::~IntelliToolPolygon(){
|
|||||||
|
|
||||||
void IntelliToolPolygon::onMouseLeftPressed(int x, int y){
|
void IntelliToolPolygon::onMouseLeftPressed(int x, int y){
|
||||||
if(!isDrawing && Area->getTypeOfImageRealLayer() == IntelliImage::ImageType::Shaped_Image && x > 0 && y > 0 && x<Area->getWidthOfActive() && y<Area->getHeightOfActive()){
|
if(!isDrawing && Area->getTypeOfImageRealLayer() == IntelliImage::ImageType::Shaped_Image && x > 0 && y > 0 && x<Area->getWidthOfActive() && y<Area->getHeightOfActive()){
|
||||||
std::vector<Triangle> Triangles = IntelliHelper::calculateTriangles(Area->getPolygonDataOfRealLayer());
|
std::vector<Triangle> Triangles = IntelliTriangulation::calculateTriangles(Area->getPolygonDataOfRealLayer());
|
||||||
QPoint Point(x,y);
|
QPoint Point(x,y);
|
||||||
isInside = IntelliHelper::isInPolygon(Triangles,Point);
|
isInside = IntelliTriangulation::isInPolygon(Triangles,Point);
|
||||||
}
|
}
|
||||||
else if(!isDrawing && Area->getTypeOfImageRealLayer() == IntelliImage::ImageType::Raster_Image && x > 0 && y > 0 && x<Area->getWidthOfActive() && y<Area->getHeightOfActive()){
|
else if(!isDrawing && Area->getTypeOfImageRealLayer() == IntelliImage::ImageType::Raster_Image && x > 0 && y > 0 && x<Area->getWidthOfActive() && y<Area->getHeightOfActive()){
|
||||||
isInside = true;
|
isInside = true;
|
||||||
@@ -37,13 +35,13 @@ void IntelliToolPolygon::onMouseLeftPressed(int x, int y){
|
|||||||
isDrawing = true;
|
isDrawing = true;
|
||||||
QPointList.push_back(drawingPoint);
|
QPointList.push_back(drawingPoint);
|
||||||
|
|
||||||
this->Canvas->image->drawPoint(QPointList.back(), colorPicker->getFirstColor(), lineWidth);
|
this->Canvas->image->drawPoint(QPointList.back(), colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
this->Canvas->image->calculateVisiblity();
|
this->Canvas->image->calculateVisiblity();
|
||||||
}
|
}
|
||||||
else if(isDrawing && isNearStart(x,y,QPointList.front())) {
|
else if(isDrawing && isNearStart(x,y,QPointList.front())) {
|
||||||
if(QPointList.size() > 2){
|
if(QPointList.size() > 2){
|
||||||
isPointNearStart = true;
|
isPointNearStart = true;
|
||||||
this->Canvas->image->drawLine(QPointList.back(), QPointList.front(), colorPicker->getFirstColor(), lineWidth);
|
this->Canvas->image->drawLine(QPointList.back(), QPointList.front(), colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
this->Canvas->image->calculateVisiblity();
|
this->Canvas->image->calculateVisiblity();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -57,7 +55,7 @@ void IntelliToolPolygon::onMouseLeftPressed(int x, int y){
|
|||||||
else if(isDrawing) {
|
else if(isDrawing) {
|
||||||
QPoint drawingPoint(x,y);
|
QPoint drawingPoint(x,y);
|
||||||
QPointList.push_back(drawingPoint);
|
QPointList.push_back(drawingPoint);
|
||||||
this->Canvas->image->drawLine(QPointList[QPointList.size() - 2], QPointList[QPointList.size() - 1], colorPicker->getFirstColor(), lineWidth);
|
this->Canvas->image->drawLine(QPointList[QPointList.size() - 2], QPointList[QPointList.size() - 1], colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
this->Canvas->image->calculateVisiblity();
|
this->Canvas->image->calculateVisiblity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,21 +73,21 @@ void IntelliToolPolygon::onMouseLeftReleased(int x, int y){
|
|||||||
isInside = false;
|
isInside = false;
|
||||||
isPointNearStart = false;
|
isPointNearStart = false;
|
||||||
isDrawing = false;
|
isDrawing = false;
|
||||||
std::vector<Triangle> Triangles = IntelliHelper::calculateTriangles(QPointList);
|
std::vector<Triangle> Triangles = IntelliTriangulation::calculateTriangles(QPointList);
|
||||||
QPoint Point;
|
QPoint Point;
|
||||||
QColor colorTwo(colorPicker->getSecondColor());
|
QColor colorTwo(colorPicker->getSecondColor());
|
||||||
colorTwo.setAlpha(innerAlpha);
|
colorTwo.setAlpha(Toolsettings->getInnerAlpha());
|
||||||
for(int i = 0; i < activeLayer->width; i++) {
|
for(int i = 0; i < activeLayer->width; i++) {
|
||||||
for(int j = 0; j < activeLayer->height; j++) {
|
for(int j = 0; j < activeLayer->height; j++) {
|
||||||
Point = QPoint(i,j);
|
Point = QPoint(i,j);
|
||||||
if(IntelliHelper::isInPolygon(Triangles,Point)) {
|
if(IntelliTriangulation::isInPolygon(Triangles,Point)) {
|
||||||
this->Canvas->image->drawPixel(Point, colorTwo);
|
this->Canvas->image->drawPixel(Point, colorTwo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(int i=0; i<static_cast<int>(QPointList.size()); i++) {
|
for(int i=0; i<static_cast<int>(QPointList.size()); i++) {
|
||||||
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(), lineWidth);
|
this->Canvas->image->drawLine(QPointList[static_cast<unsigned long long>(i)], QPointList[static_cast<unsigned long long>(next)], colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
}
|
}
|
||||||
QPointList.clear();
|
QPointList.clear();
|
||||||
IntelliTool::onMouseLeftReleased(x,y);
|
IntelliTool::onMouseLeftReleased(x,y);
|
||||||
@@ -103,12 +101,7 @@ void IntelliToolPolygon::onMouseRightReleased(int x, int y){
|
|||||||
void IntelliToolPolygon::onWheelScrolled(int value){
|
void IntelliToolPolygon::onWheelScrolled(int value){
|
||||||
IntelliTool::onWheelScrolled(value);
|
IntelliTool::onWheelScrolled(value);
|
||||||
if(!isDrawing) {
|
if(!isDrawing) {
|
||||||
if(lineWidth + value < 10) {
|
Toolsettings->setLineWidth(Toolsettings->getLineWidth() + value);
|
||||||
lineWidth += value;
|
|
||||||
}
|
|
||||||
if(lineWidth < 1) {
|
|
||||||
lineWidth = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#define INTELLITOOLPOLYGON_H
|
#define INTELLITOOLPOLYGON_H
|
||||||
|
|
||||||
#include "IntelliTool.h"
|
#include "IntelliTool.h"
|
||||||
#include "IntelliHelper/IntelliHelper.h"
|
#include "IntelliHelper/IntelliTriangulation.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
/*!
|
/*!
|
||||||
@@ -19,11 +19,6 @@ class IntelliToolPolygon : public IntelliTool
|
|||||||
*/
|
*/
|
||||||
bool isNearStart(int x, int y, QPoint Startpoint);
|
bool isNearStart(int x, int y, QPoint Startpoint);
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief LineWidth of the drawing polygon.
|
|
||||||
*/
|
|
||||||
int lineWidth;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief IsDrawing true while drawing, else false.
|
* \brief IsDrawing true while drawing, else false.
|
||||||
*/
|
*/
|
||||||
@@ -39,11 +34,6 @@ bool isInside;
|
|||||||
*/
|
*/
|
||||||
bool isPointNearStart;
|
bool isPointNearStart;
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief The alpha value of the inner circle.
|
|
||||||
*/
|
|
||||||
int innerAlpha;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief QPointList list of all points of the polygon.
|
* \brief QPointList list of all points of the polygon.
|
||||||
*/
|
*/
|
||||||
@@ -54,7 +44,7 @@ public:
|
|||||||
* \param Area - The general paintingArea used by the project.
|
* \param Area - The general paintingArea used by the project.
|
||||||
* \param colorPicker - The general colorPicker used by the project.
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
*/
|
*/
|
||||||
IntelliToolPolygon(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliToolPolygon(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings);
|
||||||
/*!
|
/*!
|
||||||
* \brief A Destructor.
|
* \brief A Destructor.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,10 +2,8 @@
|
|||||||
#include "Layer/PaintingArea.h"
|
#include "Layer/PaintingArea.h"
|
||||||
#include "QInputDialog"
|
#include "QInputDialog"
|
||||||
|
|
||||||
IntelliToolRectangle::IntelliToolRectangle(PaintingArea* Area, IntelliColorPicker* colorPicker)
|
IntelliToolRectangle::IntelliToolRectangle(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings)
|
||||||
: IntelliTool(Area, colorPicker){
|
: IntelliTool(Area, colorPicker, Toolsettings){
|
||||||
this->innerAlpha = QInputDialog::getInt(nullptr,"Inner Alpha Value", "Value:", 0,0,255,1);
|
|
||||||
this->borderWidth = QInputDialog::getInt(nullptr,"Outer edge width", "Value:", 0,1,255,1);
|
|
||||||
this->ActiveType = Tooltype::RECTANGLE;
|
this->ActiveType = Tooltype::RECTANGLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,14 +19,14 @@ void IntelliToolRectangle::drawRectangle(QPoint otherCorner){
|
|||||||
int yMax = std::max(originCorner.y(), otherCorner.y());
|
int yMax = std::max(originCorner.y(), otherCorner.y());
|
||||||
|
|
||||||
QColor clr = colorPicker->getSecondColor();
|
QColor clr = colorPicker->getSecondColor();
|
||||||
clr.setAlpha(innerAlpha);
|
clr.setAlpha(Toolsettings->getInnerAlpha());
|
||||||
for(int y=yMin; y<=yMax; y++) {
|
for(int y=yMin; y<=yMax; y++) {
|
||||||
this->Canvas->image->drawLine(QPoint(xMin,y), QPoint(xMax, y), clr, 1);
|
this->Canvas->image->drawLine(QPoint(xMin,y), QPoint(xMax, y), clr, 1);
|
||||||
}
|
}
|
||||||
this->Canvas->image->drawLine(QPoint(xMin, yMin),QPoint(xMin, yMax), this->colorPicker->getFirstColor(), borderWidth);
|
this->Canvas->image->drawLine(QPoint(xMin, yMin),QPoint(xMin, yMax), this->colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
this->Canvas->image->drawLine(QPoint(xMin, yMin),QPoint(xMax, yMin), this->colorPicker->getFirstColor(), borderWidth);
|
this->Canvas->image->drawLine(QPoint(xMin, yMin),QPoint(xMax, yMin), this->colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
this->Canvas->image->drawLine(QPoint(xMax, yMax),QPoint(xMin, yMax), this->colorPicker->getFirstColor(), borderWidth);
|
this->Canvas->image->drawLine(QPoint(xMax, yMax),QPoint(xMin, yMax), this->colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
this->Canvas->image->drawLine(QPoint(xMax, yMax),QPoint(xMax, yMin), this->colorPicker->getFirstColor(), borderWidth);
|
this->Canvas->image->drawLine(QPoint(xMax, yMax),QPoint(xMax, yMin), this->colorPicker->getFirstColor(), Toolsettings->getLineWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliToolRectangle::onMouseRightPressed(int x, int y){
|
void IntelliToolRectangle::onMouseRightPressed(int x, int y){
|
||||||
@@ -61,8 +59,5 @@ void IntelliToolRectangle::onMouseMoved(int x, int y){
|
|||||||
|
|
||||||
void IntelliToolRectangle::onWheelScrolled(int value){
|
void IntelliToolRectangle::onWheelScrolled(int value){
|
||||||
IntelliTool::onWheelScrolled(value);
|
IntelliTool::onWheelScrolled(value);
|
||||||
this->borderWidth+=value;
|
Toolsettings->setLineWidth(Toolsettings->getLineWidth()+value);
|
||||||
if(this->borderWidth<=0) {
|
|
||||||
this->borderWidth=1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,21 +19,13 @@ void drawRectangle(QPoint otherCorner);
|
|||||||
* \brief origincorner - The first corner point of the rectangle.
|
* \brief origincorner - The first corner point of the rectangle.
|
||||||
*/
|
*/
|
||||||
QPoint originCorner;
|
QPoint originCorner;
|
||||||
/*!
|
|
||||||
* \brief alphaInner- Represents the alpha value of the inside.
|
|
||||||
*/
|
|
||||||
int innerAlpha;
|
|
||||||
/*!
|
|
||||||
* \brief edgeWidth - The width of the rectangle edges.
|
|
||||||
*/
|
|
||||||
int borderWidth;
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
* \brief A constructor setting the general paintingArea and colorPicker. And reading in the alphaInner and edgeWidth.
|
* \brief A constructor setting the general paintingArea and colorPicker. And reading in the alphaInner and edgeWidth.
|
||||||
* \param Area - The general paintingArea used by the project.
|
* \param Area - The general paintingArea used by the project.
|
||||||
* \param colorPicker - The general colorPicker used by the project.
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
*/
|
*/
|
||||||
IntelliToolRectangle(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliToolRectangle(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings);
|
||||||
/*!
|
/*!
|
||||||
* \brief A Destructor.
|
* \brief A Destructor.
|
||||||
*/
|
*/
|
||||||
|
|||||||
BIN
src/icons/Wechselpfeile.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
94
src/icons/circle-tool.svg
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="256"
|
||||||
|
height="256"
|
||||||
|
viewBox="0 0 67.733332 67.733335"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
sodipodi:docname="circle-tool.svg"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient36">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop32" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop34" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient36"
|
||||||
|
id="linearGradient38"
|
||||||
|
x1="147.98735"
|
||||||
|
y1="176.19795"
|
||||||
|
x2="-13.131983"
|
||||||
|
y2="106.49742"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="2.8"
|
||||||
|
inkscape:cx="166.94289"
|
||||||
|
inkscape:cy="125.27289"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
showguides="false"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1017"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-229.26665)">
|
||||||
|
<circle
|
||||||
|
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1.85208333;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="circle4578"
|
||||||
|
cx="33.78162"
|
||||||
|
cy="263.02939"
|
||||||
|
r="2.5985863" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:2.11666656;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="path4602"
|
||||||
|
cx="33.781624"
|
||||||
|
cy="263.50183"
|
||||||
|
r="26.316593" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.7 KiB |
109
src/icons/eraser-tool.svg
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="256"
|
||||||
|
height="256"
|
||||||
|
viewBox="0 0 67.733332 67.733335"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
sodipodi:docname="eraser-tool.svg"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||||
|
inkscape:export-filename="C:\Users\pauln\tool1.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96">
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient36">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop32" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop34" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient36"
|
||||||
|
id="linearGradient38"
|
||||||
|
x1="147.98735"
|
||||||
|
y1="176.19795"
|
||||||
|
x2="-13.131983"
|
||||||
|
y2="106.49742"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="2.8"
|
||||||
|
inkscape:cx="154.79235"
|
||||||
|
inkscape:cy="136.37674"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="g4716"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
showguides="false"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1017"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-global="false" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-229.26665)">
|
||||||
|
<g
|
||||||
|
id="g4716">
|
||||||
|
<rect
|
||||||
|
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.54304647;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="rect4775"
|
||||||
|
width="59.058777"
|
||||||
|
height="57.168896"
|
||||||
|
x="4.2522316"
|
||||||
|
y="234.16145" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#ffffff;stroke-width:16.96439552;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 64.539433,248.9069 -8.315476,0.24173 c 0,0 -13.890625,31.06218 -29.576635,22.72253"
|
||||||
|
id="path4777"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<rect
|
||||||
|
style="fill:#000000;fill-opacity:1;stroke:#ffaaaa;stroke-width:19.02600098;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="rect4779"
|
||||||
|
width="3.5923276"
|
||||||
|
height="18.439137"
|
||||||
|
x="100.56355"
|
||||||
|
y="236.22752"
|
||||||
|
transform="matrix(0.96477278,0.26308456,-0.30397854,0.95267888,0,0)" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.4 KiB |
194
src/icons/flood-fill-tool.svg
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="256"
|
||||||
|
height="256"
|
||||||
|
viewBox="0 0 67.733332 67.733335"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
sodipodi:docname="flood-fill-tool.svg"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient4746">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop4742" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ff0000;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4744" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient36">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop32" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop34" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient36"
|
||||||
|
id="linearGradient38"
|
||||||
|
x1="147.98735"
|
||||||
|
y1="176.19795"
|
||||||
|
x2="-13.131983"
|
||||||
|
y2="106.49742"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4746"
|
||||||
|
id="linearGradient4748"
|
||||||
|
x1="278.75943"
|
||||||
|
y1="55.545975"
|
||||||
|
x2="278.70905"
|
||||||
|
y2="102.68295"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="2.8"
|
||||||
|
inkscape:cx="178.00664"
|
||||||
|
inkscape:cy="120.50274"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="g4716"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
showguides="false"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1017"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-global="false" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-229.26665)">
|
||||||
|
<g
|
||||||
|
id="g4716">
|
||||||
|
<rect
|
||||||
|
style="fill:url(#linearGradient4748);fill-opacity:1;stroke:#000000;stroke-width:2.54346728;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="rect4736"
|
||||||
|
width="20.992056"
|
||||||
|
height="38.493938"
|
||||||
|
x="268.06161"
|
||||||
|
y="65.299561"
|
||||||
|
transform="matrix(0.37877425,0.9254891,-0.96183685,0.2736236,0,0)" />
|
||||||
|
<rect
|
||||||
|
y="199.89908"
|
||||||
|
x="116.56168"
|
||||||
|
height="29.387648"
|
||||||
|
width="34.49033"
|
||||||
|
id="rect4710"
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2.11666656;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="rotate(22.139383)" />
|
||||||
|
<ellipse
|
||||||
|
ry="3.6608384"
|
||||||
|
rx="17.12623"
|
||||||
|
cy="229.80646"
|
||||||
|
cx="133.85408"
|
||||||
|
id="path4712"
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2.07105064;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="rotate(22.139383)" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.57643586;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="rect4722"
|
||||||
|
width="6.4093542"
|
||||||
|
height="5.9942107"
|
||||||
|
x="106.55282"
|
||||||
|
y="220.71335"
|
||||||
|
transform="matrix(0.89502052,0.44602497,-0.31493366,0.94911369,0,0)"
|
||||||
|
ry="2.9971054" />
|
||||||
|
<rect
|
||||||
|
ry="4.9373565"
|
||||||
|
transform="matrix(0.76230952,0.64721263,-0.19117303,0.98155635,0,0)"
|
||||||
|
y="211.36087"
|
||||||
|
x="91.973289"
|
||||||
|
height="9.8747129"
|
||||||
|
width="7.5251632"
|
||||||
|
id="rect4726"
|
||||||
|
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.80167449;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.68775666;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="rect4728"
|
||||||
|
width="6.9141498"
|
||||||
|
height="7.9099746"
|
||||||
|
x="106.98909"
|
||||||
|
y="208.27184"
|
||||||
|
transform="matrix(0.82967592,0.55824535,-0.238658,0.97110368,0,0)"
|
||||||
|
ry="3.9549873" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.83867002;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="rect4732"
|
||||||
|
width="7.7389083"
|
||||||
|
height="10.508647"
|
||||||
|
x="99.318977"
|
||||||
|
y="206.74135"
|
||||||
|
transform="matrix(0.74125487,0.67122367,-0.1796405,0.98373233,0,0)"
|
||||||
|
ry="5.2543235" />
|
||||||
|
<rect
|
||||||
|
ry="4.9687924"
|
||||||
|
transform="matrix(0.76020136,0.64968753,-0.18996354,0.98179115,0,0)"
|
||||||
|
y="213.06801"
|
||||||
|
x="82.413681"
|
||||||
|
height="9.9375849"
|
||||||
|
width="7.5460315"
|
||||||
|
id="rect4734"
|
||||||
|
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.80533689;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
<rect
|
||||||
|
ry="2.9971054"
|
||||||
|
transform="matrix(0.89502052,0.44602497,-0.31493366,0.94911369,0,0)"
|
||||||
|
y="219.89731"
|
||||||
|
x="128.72516"
|
||||||
|
height="5.9942107"
|
||||||
|
width="6.4093542"
|
||||||
|
id="rect4738"
|
||||||
|
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.57643586;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.61344987;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="rect4740"
|
||||||
|
width="6.5649834"
|
||||||
|
height="6.6277919"
|
||||||
|
x="107.49622"
|
||||||
|
y="215.86592"
|
||||||
|
transform="matrix(0.87380318,0.48627976,-0.28482771,0.95857873,0,0)"
|
||||||
|
ry="3.3138959" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 6.3 KiB |
BIN
src/icons/icon.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
169
src/icons/magic-wand-tool.svg
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="256"
|
||||||
|
height="256"
|
||||||
|
viewBox="0 0 67.733332 67.733335"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
sodipodi:docname="magic-wand-tool.svg"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient36">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop32" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop34" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient36"
|
||||||
|
id="linearGradient38"
|
||||||
|
x1="147.98735"
|
||||||
|
y1="176.19795"
|
||||||
|
x2="-13.131983"
|
||||||
|
y2="106.49742"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="2.8"
|
||||||
|
inkscape:cx="154.79235"
|
||||||
|
inkscape:cy="122.64559"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="g4716"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
showguides="false"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1017"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-global="false" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-229.26665)">
|
||||||
|
<g
|
||||||
|
id="g4716">
|
||||||
|
<g
|
||||||
|
id="g4767"
|
||||||
|
transform="translate(-4.5357143,7.0870536)">
|
||||||
|
<rect
|
||||||
|
transform="rotate(45)"
|
||||||
|
ry="1.889881"
|
||||||
|
y="137.33192"
|
||||||
|
x="203.35738"
|
||||||
|
height="53.483627"
|
||||||
|
width="10.299852"
|
||||||
|
id="rect4758"
|
||||||
|
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.7175684;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
<rect
|
||||||
|
transform="rotate(45)"
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.8319869;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="rect4760"
|
||||||
|
width="9.7328882"
|
||||||
|
height="2.8348179"
|
||||||
|
x="203.64085"
|
||||||
|
y="148.6712" />
|
||||||
|
<rect
|
||||||
|
transform="rotate(45)"
|
||||||
|
y="141.20618"
|
||||||
|
x="203.64085"
|
||||||
|
height="2.8348179"
|
||||||
|
width="9.7328882"
|
||||||
|
id="rect4762"
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.8319869;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:2.11666656;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="path4769"
|
||||||
|
sodipodi:sides="5"
|
||||||
|
sodipodi:cx="44.223213"
|
||||||
|
sodipodi:cy="239.92558"
|
||||||
|
sodipodi:r1="8.624361"
|
||||||
|
sodipodi:r2="4.3121805"
|
||||||
|
sodipodi:arg1="1.0040671"
|
||||||
|
sodipodi:arg2="1.6323856"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="m 48.853421,247.20162 -4.895624,-2.97203 -5.223697,2.348 1.313744,-5.57442 -3.847298,-4.24246 5.707563,-0.47315 2.845937,-4.96999 2.213724,5.28201 5.606183,1.17083 -4.339406,3.73761 z"
|
||||||
|
inkscape:transform-center-x="2.6385383"
|
||||||
|
inkscape:transform-center-y="1.2565374"
|
||||||
|
transform="rotate(-21.763247,66.493886,211.70978)" />
|
||||||
|
<path
|
||||||
|
transform="matrix(-0.16940831,-0.61726905,0.61726905,-0.16940831,-99.981719,307.02239)"
|
||||||
|
inkscape:transform-center-y="1.5995691"
|
||||||
|
inkscape:transform-center-x="-0.47805579"
|
||||||
|
d="m 48.853421,247.20162 -4.895624,-2.97203 -5.223697,2.348 1.313744,-5.57442 -3.847298,-4.24246 5.707563,-0.47315 2.845937,-4.96999 2.213724,5.28201 5.606183,1.17083 -4.339406,3.73761 z"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="1.6323856"
|
||||||
|
sodipodi:arg1="1.0040671"
|
||||||
|
sodipodi:r2="4.3121805"
|
||||||
|
sodipodi:r1="8.624361"
|
||||||
|
sodipodi:cy="239.92558"
|
||||||
|
sodipodi:cx="44.223213"
|
||||||
|
sodipodi:sides="5"
|
||||||
|
id="path4771"
|
||||||
|
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:2.11666656;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
sodipodi:type="star" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:2.11666656;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="path4773"
|
||||||
|
sodipodi:sides="5"
|
||||||
|
sodipodi:cx="44.223213"
|
||||||
|
sodipodi:cy="239.92558"
|
||||||
|
sodipodi:r1="8.624361"
|
||||||
|
sodipodi:r2="4.3121805"
|
||||||
|
sodipodi:arg1="1.0040671"
|
||||||
|
sodipodi:arg2="1.6323856"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="m 48.853421,247.20162 -4.895624,-2.97203 -5.223697,2.348 1.313744,-5.57442 -3.847298,-4.24246 5.707563,-0.47315 2.845937,-4.96999 2.213724,5.28201 5.606183,1.17083 -4.339406,3.73761 z"
|
||||||
|
inkscape:transform-center-x="0.0027046201"
|
||||||
|
inkscape:transform-center-y="1.1149197"
|
||||||
|
transform="matrix(0.25199367,-0.58840415,0.58840415,0.25199367,-99.952707,231.42813)" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 6.0 KiB |
105
src/icons/pen-tool.svg
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="256"
|
||||||
|
height="256"
|
||||||
|
viewBox="0 0 67.733332 67.733335"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||||
|
sodipodi:docname="pen-tool.svg">
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient36">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop32" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop34" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient36"
|
||||||
|
id="linearGradient38"
|
||||||
|
x1="147.98735"
|
||||||
|
y1="176.19795"
|
||||||
|
x2="-13.131983"
|
||||||
|
y2="106.49742"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.4"
|
||||||
|
inkscape:cx="376.91553"
|
||||||
|
inkscape:cy="52.667178"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
showguides="false"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1017"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-229.26665)">
|
||||||
|
<path
|
||||||
|
style="fill:#000000;fill-opacity:1;stroke-width:0.79907227"
|
||||||
|
inkscape:transform-center-x="2.1805457"
|
||||||
|
inkscape:transform-center-y="0.23135325"
|
||||||
|
d="m 64.660259,230.98439 c -1.469539,1.22623 -3.009608,0.3208 -4.479147,2.55438 l -35.355186,29.81232 20.997146,4.03437 16.236587,-28.5477 c 2.650564,-3.49373 1.675561,-4.59875 2.6006,-7.85337 z"
|
||||||
|
id="path16"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccc" />
|
||||||
|
<ellipse
|
||||||
|
style="fill:#000000;fill-opacity:1;stroke-width:0.2446842"
|
||||||
|
id="path19"
|
||||||
|
ry="4.8653927"
|
||||||
|
rx="10.959454"
|
||||||
|
cy="259.34927"
|
||||||
|
cx="70.703522"
|
||||||
|
transform="matrix(0.99175335,0.12816118,-0.13566218,0.99075515,0,0)" />
|
||||||
|
<path
|
||||||
|
style="fill:url(#linearGradient38);fill-opacity:1;stroke:none;stroke-width:1.1613673px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="M 19.935603,103.02103 C 11.487015,114.14384 3.7900432,116.38626 5.1066573,144.52297 7.9154345,204.54791 22.091131,264.29315 75.056641,251.85938 127.52071,239.54339 188.58555,194.70704 177.64844,158.85742 c -12.48014,3.63122 -34.362,10.63187 -51.541,8.65662 -12.43758,-1.43999 -33.957254,-24.02776 -43.821058,-27.9929 -2.739296,6.28676 5.637281,36.28371 -21.584814,27.90384 -62.9196406,-19.36876 11.109787,-93.171912 16.121057,-90.16515 0,0 -33.485263,-5.047889 -56.887022,25.7612 z"
|
||||||
|
transform="matrix(0.26458333,0,0,0.26458333,0,229.26665)"
|
||||||
|
id="path23"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ssccccscs" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.8 KiB |
117
src/icons/polygon-tool.svg
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="256"
|
||||||
|
height="256"
|
||||||
|
viewBox="0 0 67.733332 67.733335"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
sodipodi:docname="polygon-tool.svg"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient36">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop32" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop34" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient36"
|
||||||
|
id="linearGradient38"
|
||||||
|
x1="147.98735"
|
||||||
|
y1="176.19795"
|
||||||
|
x2="-13.131983"
|
||||||
|
y2="106.49742"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="2.8"
|
||||||
|
inkscape:cx="107.4786"
|
||||||
|
inkscape:cy="125.27289"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
showguides="false"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1017"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-229.26665)">
|
||||||
|
<path
|
||||||
|
style="fill:#ff0000;stroke:#000000;stroke-width:2.11666667;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;fill-opacity:0"
|
||||||
|
d="M 6.7090773,250.6979 61.137648,243.51635 60.47619,288.87349 10.205357,286.13317 22.867559,260.33629 Z"
|
||||||
|
id="path4590"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<circle
|
||||||
|
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1.85208333;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="path4572"
|
||||||
|
cx="4.5829611"
|
||||||
|
cy="249.98918"
|
||||||
|
r="2.5985863" />
|
||||||
|
<circle
|
||||||
|
r="2.5985863"
|
||||||
|
cy="243.5636"
|
||||||
|
cx="61.090405"
|
||||||
|
id="circle4574"
|
||||||
|
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1.85208333;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
<circle
|
||||||
|
r="2.5985863"
|
||||||
|
cy="260.38354"
|
||||||
|
cx="22.914806"
|
||||||
|
id="circle4576"
|
||||||
|
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1.85208333;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
|
<circle
|
||||||
|
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1.85208333;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="circle4588"
|
||||||
|
cx="9.0241814"
|
||||||
|
cy="286.84189"
|
||||||
|
r="2.5985863" />
|
||||||
|
<circle
|
||||||
|
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1.85208333;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="circle4578"
|
||||||
|
cx="60.523441"
|
||||||
|
cy="288.82626"
|
||||||
|
r="2.5985863" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.7 KiB |
101
src/icons/rectangle-tool.svg
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="256"
|
||||||
|
height="256"
|
||||||
|
viewBox="0 0 67.733332 67.733335"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
sodipodi:docname="rectangle-tool.svg"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient36">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop32" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d40000;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop34" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient36"
|
||||||
|
id="linearGradient38"
|
||||||
|
x1="147.98735"
|
||||||
|
y1="176.19795"
|
||||||
|
x2="-13.131983"
|
||||||
|
y2="106.49742"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="2.8"
|
||||||
|
inkscape:cx="107.4786"
|
||||||
|
inkscape:cy="125.27289"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
showguides="false"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1017"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-229.26665)">
|
||||||
|
<rect
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.85208333;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="rect56"
|
||||||
|
width="54.995537"
|
||||||
|
height="38.648064"
|
||||||
|
x="6.1421127"
|
||||||
|
y="243.04388" />
|
||||||
|
<circle
|
||||||
|
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1.85208333;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="path4572"
|
||||||
|
cx="6.3783484"
|
||||||
|
cy="243.5636"
|
||||||
|
r="2.5985863" />
|
||||||
|
<circle
|
||||||
|
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1.85208333;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="circle4578"
|
||||||
|
cx="61.090405"
|
||||||
|
cy="281.7392"
|
||||||
|
r="2.5985863" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.9 KiB |
@@ -1,7 +1,6 @@
|
|||||||
#include "GUI/IntelliPhotoGui.h"
|
#include "GUI/IntelliPhotoGui.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "IntelliHelper/IntelliHelper.h"
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
int main(int argc, char*argv[]){
|
int main(int argc, char*argv[]){
|
||||||
|
|||||||