mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-15 21:00:37 +02:00
Updatet ui fixed bugs, improved performance, just everything
Autors: @DerAnonymos @AshBastian @Sonaion
This commit is contained in:
@@ -3,11 +3,12 @@
|
|||||||
<file>icons/icon.png</file>
|
<file>icons/icon.png</file>
|
||||||
<file>icons/circle-tool.svg</file>
|
<file>icons/circle-tool.svg</file>
|
||||||
<file>icons/eraser-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/pen-tool.svg</file>
|
||||||
<file>icons/polygon-tool.svg</file>
|
<file>icons/polygon-tool.svg</file>
|
||||||
<file>icons/rectangle-tool.svg</file>
|
<file>icons/rectangle-tool.svg</file>
|
||||||
<file>icons/Wechselpfeile.png</file>
|
<file>icons/Wechselpfeile.png</file>
|
||||||
|
<file>icons/line-tool.svg</file>
|
||||||
|
<file>icons/flood-fill-tool.svg</file>
|
||||||
|
<file>icons/plain-tool.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -95,10 +95,10 @@ 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:"),
|
||||||
paintingArea->getNumberOfActiveLayer(),0, 500, 1, &ok);
|
paintingArea->getNumberOfActiveLayer()+1,1, 501, 1, &ok);
|
||||||
// Create New Layer
|
// Create New Layer
|
||||||
if (ok) {
|
if (ok) {
|
||||||
paintingArea->deleteLayer(layerNumber);
|
paintingArea->deleteLayer(layerNumber-1);
|
||||||
UpdateGui();
|
UpdateGui();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -200,6 +200,16 @@ void IntelliPhotoGui::slotSetActiveLayer(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IntelliPhotoGui::slotUpdateRenderSettingsOn(){
|
||||||
|
paintingArea->setRenderSettings(true);
|
||||||
|
UpdateGui();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IntelliPhotoGui::slotUpdateRenderSettingsOff(){
|
||||||
|
paintingArea->setRenderSettings(false);
|
||||||
|
UpdateGui();
|
||||||
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotSetFirstColor(){
|
void IntelliPhotoGui::slotSetFirstColor(){
|
||||||
paintingArea->colorPickerSetFirstColor();
|
paintingArea->colorPickerSetFirstColor();
|
||||||
UpdateGui();
|
UpdateGui();
|
||||||
@@ -356,6 +366,13 @@ void IntelliPhotoGui::createActions(){
|
|||||||
actionMoveLayerDown->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Down));
|
actionMoveLayerDown->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Down));
|
||||||
connect(actionMoveLayerDown, SIGNAL(triggered()), this, SLOT(slotMoveLayerDown()));
|
connect(actionMoveLayerDown, SIGNAL(triggered()), this, SLOT(slotMoveLayerDown()));
|
||||||
|
|
||||||
|
//Create Update RenderSettings Actions here
|
||||||
|
actionUpdateRenderSettingsOn = new QAction(tr("&On"), this);
|
||||||
|
connect(actionUpdateRenderSettingsOn, SIGNAL(triggered()),this, SLOT(slotUpdateRenderSettingsOn()));
|
||||||
|
|
||||||
|
actionUpdateRenderSettingsOff = new QAction(tr("&Off"), this);
|
||||||
|
connect(actionUpdateRenderSettingsOff, SIGNAL(triggered()),this, SLOT(slotUpdateRenderSettingsOff()));
|
||||||
|
|
||||||
//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()));
|
||||||
@@ -448,6 +465,11 @@ void IntelliPhotoGui::createMenus(){
|
|||||||
fileMenu->addSeparator();
|
fileMenu->addSeparator();
|
||||||
fileMenu->addAction(actionExit);
|
fileMenu->addAction(actionExit);
|
||||||
|
|
||||||
|
//Attach all actions to Render Settings
|
||||||
|
renderMenu = new QMenu(tr("&Fast Renderer"), this);
|
||||||
|
renderMenu->addAction(actionUpdateRenderSettingsOn);
|
||||||
|
renderMenu->addAction(actionUpdateRenderSettingsOff);
|
||||||
|
|
||||||
// Attach all actions to Options
|
// Attach all actions to Options
|
||||||
optionMenu = new QMenu(tr("&Options"), this);
|
optionMenu = new QMenu(tr("&Options"), this);
|
||||||
optionMenu->addAction(actionSetActiveLayer);
|
optionMenu->addAction(actionSetActiveLayer);
|
||||||
@@ -458,6 +480,8 @@ void IntelliPhotoGui::createMenus(){
|
|||||||
optionMenu->addAction(actionMovePositionRight);
|
optionMenu->addAction(actionMovePositionRight);
|
||||||
optionMenu->addAction(actionMoveLayerUp);
|
optionMenu->addAction(actionMoveLayerUp);
|
||||||
optionMenu->addAction(actionMoveLayerDown);
|
optionMenu->addAction(actionMoveLayerDown);
|
||||||
|
optionMenu->addSeparator();
|
||||||
|
optionMenu->addMenu(renderMenu);
|
||||||
|
|
||||||
// Attach all actions to Layer
|
// Attach all actions to Layer
|
||||||
layerMenu = new QMenu(tr("&Layer"), this);
|
layerMenu = new QMenu(tr("&Layer"), this);
|
||||||
@@ -506,54 +530,54 @@ void IntelliPhotoGui::createGui(){
|
|||||||
|
|
||||||
// create Gui elements
|
// create Gui elements
|
||||||
paintingArea = new PaintingArea();
|
paintingArea = new PaintingArea();
|
||||||
paintingArea->DumpyGui = this;
|
paintingArea->DummyGui = this;
|
||||||
|
|
||||||
p = QPixmap(":/Icons/Buttons/icons/circle-tool.svg");
|
preview = QPixmap(":/Icons/Buttons/icons/circle-tool.svg");
|
||||||
CircleButton = new QPushButton();
|
CircleButton = new QPushButton();
|
||||||
CircleButton->setFixedSize(Buttonsize);
|
CircleButton->setFixedSize(Buttonsize);
|
||||||
CircleButton->setIcon(p);
|
CircleButton->setIcon(preview);
|
||||||
CircleButton->setIconSize(Buttonsize);
|
CircleButton->setIconSize(Buttonsize);
|
||||||
CircleButton->setCheckable(true);
|
CircleButton->setCheckable(true);
|
||||||
|
|
||||||
p = QPixmap(":/Icons/Buttons/icons/flood-fill-tool.svg");
|
preview = QPixmap(":/Icons/Buttons/icons/flood-fill-tool.svg");
|
||||||
FloodFillButton = new QPushButton();
|
FloodFillButton = new QPushButton();
|
||||||
FloodFillButton->setFixedSize(Buttonsize);
|
FloodFillButton->setFixedSize(Buttonsize);
|
||||||
FloodFillButton->setIcon(p);
|
FloodFillButton->setIcon(preview);
|
||||||
FloodFillButton->setIconSize(Buttonsize);
|
FloodFillButton->setIconSize(Buttonsize);
|
||||||
FloodFillButton->setCheckable(true);
|
FloodFillButton->setCheckable(true);
|
||||||
|
|
||||||
p = QPixmap(":/Icons/Buttons/icons/icon.png");
|
preview = QPixmap(":/Icons/Buttons/icons/line-tool.svg");
|
||||||
LineButton = new QPushButton();
|
LineButton = new QPushButton();
|
||||||
LineButton->setFixedSize(Buttonsize);
|
LineButton->setFixedSize(Buttonsize);
|
||||||
LineButton->setIcon(p);
|
LineButton->setIcon(preview);
|
||||||
LineButton->setIconSize(Buttonsize);
|
LineButton->setIconSize(Buttonsize);
|
||||||
LineButton->setCheckable(true);
|
LineButton->setCheckable(true);
|
||||||
|
|
||||||
p = QPixmap(":/Icons/Buttons/icons/pen-tool.svg");
|
preview = QPixmap(":/Icons/Buttons/icons/pen-tool.svg");
|
||||||
PenButton = new QPushButton();
|
PenButton = new QPushButton();
|
||||||
PenButton->setFixedSize(Buttonsize);
|
PenButton->setFixedSize(Buttonsize);
|
||||||
PenButton->setIcon(p);
|
PenButton->setIcon(preview);
|
||||||
PenButton->setIconSize(Buttonsize);
|
PenButton->setIconSize(Buttonsize);
|
||||||
PenButton->setCheckable(true);
|
PenButton->setCheckable(true);
|
||||||
|
|
||||||
p = QPixmap(":/Icons/Buttons/icons/icon.png");
|
preview = QPixmap(":/Icons/Buttons/icons/plain-tool.svg");
|
||||||
PlainButton = new QPushButton();
|
PlainButton = new QPushButton();
|
||||||
PlainButton->setFixedSize(Buttonsize);
|
PlainButton->setFixedSize(Buttonsize);
|
||||||
PlainButton->setIcon(p);
|
PlainButton->setIcon(preview);
|
||||||
PlainButton->setIconSize(Buttonsize);
|
PlainButton->setIconSize(Buttonsize);
|
||||||
PlainButton->setCheckable(true);
|
PlainButton->setCheckable(true);
|
||||||
|
|
||||||
p = QPixmap(":/Icons/Buttons/icons/polygon-tool.svg");
|
preview = QPixmap(":/Icons/Buttons/icons/polygon-tool.svg");
|
||||||
PolygonButton = new QPushButton();
|
PolygonButton = new QPushButton();
|
||||||
PolygonButton->setFixedSize(Buttonsize);
|
PolygonButton->setFixedSize(Buttonsize);
|
||||||
PolygonButton->setIcon(p);
|
PolygonButton->setIcon(preview);
|
||||||
PolygonButton->setIconSize(Buttonsize);
|
PolygonButton->setIconSize(Buttonsize);
|
||||||
PolygonButton->setCheckable(true);
|
PolygonButton->setCheckable(true);
|
||||||
|
|
||||||
p = QPixmap(":/Icons/Buttons/icons/rectangle-tool.svg");
|
preview = QPixmap(":/Icons/Buttons/icons/rectangle-tool.svg");
|
||||||
RectangleButton = new QPushButton();
|
RectangleButton = new QPushButton();
|
||||||
RectangleButton->setFixedSize(Buttonsize);
|
RectangleButton->setFixedSize(Buttonsize);
|
||||||
RectangleButton->setIcon(p);
|
RectangleButton->setIcon(preview);
|
||||||
RectangleButton->setIconSize(Buttonsize);
|
RectangleButton->setIconSize(Buttonsize);
|
||||||
RectangleButton->setCheckable(true);
|
RectangleButton->setCheckable(true);
|
||||||
|
|
||||||
@@ -587,22 +611,30 @@ void IntelliPhotoGui::createGui(){
|
|||||||
SecondColorButton = new QPushButton();
|
SecondColorButton = new QPushButton();
|
||||||
SecondColorButton->setFixedSize(Buttonsize/2);
|
SecondColorButton->setFixedSize(Buttonsize/2);
|
||||||
|
|
||||||
p = QPixmap(":/Icons/Buttons/icons/Wechselpfeile.png");
|
preview = QPixmap(":/Icons/Buttons/icons/Wechselpfeile.png");
|
||||||
SwitchColorButton = new QPushButton();
|
SwitchColorButton = new QPushButton();
|
||||||
SwitchColorButton->setFixedSize(Buttonsize.width(),Buttonsize.height()/2);
|
SwitchColorButton->setFixedSize(Buttonsize.width(),Buttonsize.height()/2);
|
||||||
SwitchColorButton->setIcon(p);
|
SwitchColorButton->setIcon(preview);
|
||||||
SwitchColorButton->setIconSize(QSize(Buttonsize.width(),Buttonsize.height()/2));
|
SwitchColorButton->setIconSize(QSize(Buttonsize.width(),Buttonsize.height()/2));
|
||||||
|
|
||||||
ActiveLayerLine = new QLabel();
|
ActiveLayerLine = new QLabel();
|
||||||
QString string = QString("Active Layer: %1").arg(paintingArea->getNumberOfActiveLayer());
|
QString string = QString("Active Layer: %1").arg(paintingArea->getNumberOfActiveLayer() + 1);
|
||||||
ActiveLayerLine->setText(string);
|
ActiveLayerLine->setText(string);
|
||||||
ActiveLayerLine->setFixedSize(Buttonsize.width()+10,Buttonsize.height()/3);
|
ActiveLayerLine->setFixedSize(Buttonsize.width()+10,Buttonsize.height()/3);
|
||||||
|
|
||||||
p = p.fromImage(paintingArea->getImageOfActiveLayer()->getImageData());
|
IntelliImage* activePicture = paintingArea->getImageOfActiveLayer();
|
||||||
|
if(activePicture){
|
||||||
|
preview = preview.fromImage(activePicture->getImageData());
|
||||||
|
}else{
|
||||||
|
QImage tmp(1,1,QImage::Format_ARGB32);
|
||||||
|
tmp.fill(Qt::transparent);
|
||||||
|
preview = preview.fromImage(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ActiveLayerImageButton = new QPushButton();
|
ActiveLayerImageButton = new QPushButton();
|
||||||
ActiveLayerImageButton->setFixedSize(Buttonsize);
|
ActiveLayerImageButton->setFixedSize(Buttonsize);
|
||||||
ActiveLayerImageButton->setIcon(p);
|
ActiveLayerImageButton->setIcon(preview);
|
||||||
ActiveLayerImageButton->setIconSize(Buttonsize);
|
ActiveLayerImageButton->setIconSize(Buttonsize);
|
||||||
|
|
||||||
// set gui elements
|
// set gui elements
|
||||||
@@ -692,10 +724,18 @@ void IntelliPhotoGui::setDefaultToolValue(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::UpdateGui(){
|
void IntelliPhotoGui::UpdateGui(){
|
||||||
QString string = QString("Active Layer: %1").arg(paintingArea->getNumberOfActiveLayer());
|
QString string = QString("Active Layer: %1").arg(paintingArea->getNumberOfActiveLayer() + 1);
|
||||||
ActiveLayerLine->setText(string);
|
ActiveLayerLine->setText(string);
|
||||||
p = p.fromImage(paintingArea->getImageOfActiveLayer()->getImageData());
|
|
||||||
ActiveLayerImageButton->setIcon(p);
|
IntelliImage* activePicture = paintingArea->getImageOfActiveLayer();
|
||||||
|
if(activePicture){
|
||||||
|
preview = preview.fromImage(activePicture->getImageData());
|
||||||
|
}else{
|
||||||
|
QImage tmp(1,1,QImage::Format_ARGB32);
|
||||||
|
tmp.fill(Qt::transparent);
|
||||||
|
preview = preview.fromImage(tmp);
|
||||||
|
}
|
||||||
|
ActiveLayerImageButton->setIcon(preview);
|
||||||
ActiveLayerImageButton->setIconSize(Buttonsize);
|
ActiveLayerImageButton->setIconSize(Buttonsize);
|
||||||
|
|
||||||
string = QString("background-color: %1").arg(paintingArea->colorPicker.getFirstColor().name());
|
string = QString("background-color: %1").arg(paintingArea->colorPicker.getFirstColor().name());
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ void slotPositionMoveRight();
|
|||||||
void slotMoveLayerUp();
|
void slotMoveLayerUp();
|
||||||
void slotMoveLayerDown();
|
void slotMoveLayerDown();
|
||||||
|
|
||||||
|
//Rendersetting slots here
|
||||||
|
void slotUpdateRenderSettingsOn();
|
||||||
|
void slotUpdateRenderSettingsOff();
|
||||||
|
|
||||||
// color Picker slots here
|
// color Picker slots here
|
||||||
void slotSetFirstColor();
|
void slotSetFirstColor();
|
||||||
void slotSetSecondColor();
|
void slotSetSecondColor();
|
||||||
@@ -97,7 +101,7 @@ void setDefaultToolValue();
|
|||||||
PaintingArea* paintingArea;
|
PaintingArea* paintingArea;
|
||||||
|
|
||||||
const QSize Buttonsize = QSize(70,70);
|
const QSize Buttonsize = QSize(70,70);
|
||||||
QPixmap p;
|
QPixmap preview;
|
||||||
QPushButton* CircleButton;
|
QPushButton* CircleButton;
|
||||||
QPushButton* FloodFillButton;
|
QPushButton* FloodFillButton;
|
||||||
QPushButton* LineButton;
|
QPushButton* LineButton;
|
||||||
@@ -122,6 +126,7 @@ QPushButton* ActiveLayerImageButton;
|
|||||||
// The menu widgets
|
// The menu widgets
|
||||||
QMenu*saveAsMenu;
|
QMenu*saveAsMenu;
|
||||||
QMenu*fileMenu;
|
QMenu*fileMenu;
|
||||||
|
QMenu*renderMenu;
|
||||||
QMenu*optionMenu;
|
QMenu*optionMenu;
|
||||||
QMenu*layerMenu;
|
QMenu*layerMenu;
|
||||||
QMenu*colorMenu;
|
QMenu*colorMenu;
|
||||||
@@ -133,6 +138,10 @@ QMenu*helpMenu;
|
|||||||
QAction*actionOpen;
|
QAction*actionOpen;
|
||||||
QAction*actionExit;
|
QAction*actionExit;
|
||||||
|
|
||||||
|
//Rendersetting actions
|
||||||
|
QAction*actionUpdateRenderSettingsOn;
|
||||||
|
QAction*actionUpdateRenderSettingsOff;
|
||||||
|
|
||||||
// color Picker actions
|
// color Picker actions
|
||||||
QAction*actionColorPickerFirstColor;
|
QAction*actionColorPickerFirstColor;
|
||||||
QAction*actionColorPickerSecondColor;
|
QAction*actionColorPickerSecondColor;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ IntelliImage::IntelliImage(int width, int height, bool fastRendererOn)
|
|||||||
if(fastRendererOn){
|
if(fastRendererOn){
|
||||||
imageData = imageData.convertToFormat(QImage::Format_Indexed8);
|
imageData = imageData.convertToFormat(QImage::Format_Indexed8);
|
||||||
}
|
}
|
||||||
this->fastRenderer = fastRendererOn;
|
this->fastRenderering = fastRendererOn;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ bool IntelliImage::loadImage(const QString &filePath){
|
|||||||
// scaled Image to size of Layer
|
// scaled Image to size of Layer
|
||||||
loadedImage = loadedImage.scaled(imageData.size(),Qt::IgnoreAspectRatio);
|
loadedImage = loadedImage.scaled(imageData.size(),Qt::IgnoreAspectRatio);
|
||||||
|
|
||||||
imageData = loadedImage.convertToFormat(fastRenderer ? QImage::Format_Indexed8 : QImage::Format_ARGB32);
|
imageData = loadedImage.convertToFormat(fastRenderering ? QImage::Format_Indexed8 : QImage::Format_ARGB32);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,14 +46,16 @@ void IntelliImage::resizeImage(QImage*image, const QSize &newSize){
|
|||||||
// Draw the image
|
// Draw the image
|
||||||
QPainter painter(&newImage);
|
QPainter painter(&newImage);
|
||||||
painter.drawImage(QPoint(0, 0), *image);
|
painter.drawImage(QPoint(0, 0), *image);
|
||||||
*image = newImage;
|
if(fastRenderering){
|
||||||
if(fastRenderer){
|
*image = newImage.convertToFormat(QImage::Format_Indexed8);
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
}
|
||||||
|
else{
|
||||||
|
*image = newImage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliImage::drawPixel(const QPoint &p1, const QColor& color){
|
void IntelliImage::drawPixel(const QPoint &p1, const QColor& color){
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
||||||
}
|
}
|
||||||
// Used to draw on the widget
|
// Used to draw on the widget
|
||||||
@@ -64,13 +66,13 @@ void IntelliImage::drawPixel(const QPoint &p1, const QColor& color){
|
|||||||
|
|
||||||
// Draw a line from the last registered point to the current
|
// Draw a line from the last registered point to the current
|
||||||
painter.drawPoint(p1);
|
painter.drawPoint(p1);
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliImage::drawPoint(const QPoint &p1, const QColor& color, const int& penWidth){
|
void IntelliImage::drawPoint(const QPoint &p1, const QColor& color, const int& penWidth){
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
||||||
}
|
}
|
||||||
// Used to draw on the widget
|
// Used to draw on the widget
|
||||||
@@ -80,13 +82,13 @@ void IntelliImage::drawPoint(const QPoint &p1, const QColor& color, const int& p
|
|||||||
painter.setPen(QPen(color, penWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
painter.setPen(QPen(color, penWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||||
// Draw a line from the last registered point to the current
|
// Draw a line from the last registered point to the current
|
||||||
painter.drawPoint(p1);
|
painter.drawPoint(p1);
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliImage::drawLine(const QPoint &p1, const QPoint& p2, const QColor& color, const int& penWidth){
|
void IntelliImage::drawLine(const QPoint &p1, const QPoint& p2, const QColor& color, const int& penWidth){
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
||||||
}
|
}
|
||||||
// Used to draw on the widget
|
// Used to draw on the widget
|
||||||
@@ -97,23 +99,23 @@ void IntelliImage::drawLine(const QPoint &p1, const QPoint& p2, const QColor& co
|
|||||||
|
|
||||||
// Draw a line from the last registered point to the current
|
// Draw a line from the last registered point to the current
|
||||||
painter.drawLine(p1, p2);
|
painter.drawLine(p1, p2);
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliImage::drawPlain(const QColor& color){
|
void IntelliImage::drawPlain(const QColor& color){
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
this->imageData = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
||||||
}
|
}
|
||||||
imageData.fill(color);
|
imageData.fill(color);
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor IntelliImage::getPixelColor(QPoint& point){
|
QColor IntelliImage::getPixelColor(QPoint& point){
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
QImage copy = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
QImage copy = this->imageData.convertToFormat(QImage::Format_ARGB32);
|
||||||
return copy.pixelColor(point);
|
return copy.pixelColor(point);
|
||||||
}
|
}
|
||||||
@@ -121,10 +123,29 @@ QColor IntelliImage::getPixelColor(QPoint& point){
|
|||||||
}
|
}
|
||||||
|
|
||||||
QImage IntelliImage::getImageData(){
|
QImage IntelliImage::getImageData(){
|
||||||
return this->imageData;
|
QImage copy = imageData;
|
||||||
|
if(fastRenderering){
|
||||||
|
copy = copy.convertToFormat(QImage::Format_ARGB32);
|
||||||
|
}
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IntelliImage::setImageData(const QImage& newData){
|
||||||
|
imageData = newData;
|
||||||
|
if(fastRenderering){
|
||||||
|
this->imageData = imageData.convertToFormat(QImage::Format_Indexed8);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->imageData = imageData.convertToFormat(QImage::Format_ARGB32);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliImage::updateRendererSetting(bool fastRendererOn){
|
void IntelliImage::updateRendererSetting(bool fastRendererOn){
|
||||||
this->fastRenderer = fastRendererOn;
|
this->fastRenderering = fastRendererOn;
|
||||||
this->imageData = this->imageData.convertToFormat(fastRenderer ? QImage::Format_Indexed8 : QImage::Format_ARGB32);
|
if(fastRenderering){
|
||||||
|
this->imageData = imageData.convertToFormat(QImage::Format_Indexed8);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->imageData = imageData.convertToFormat(QImage::Format_ARGB32);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ QImage imageData;
|
|||||||
ImageType TypeOfImage;
|
ImageType TypeOfImage;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief fastRenderer is the flag that represents the usage of 8bit pictures.
|
* \brief fastRendering is the flag that represents the usage of 8bit pictures.
|
||||||
*/
|
*/
|
||||||
bool fastRenderer;
|
bool fastRenderering;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
@@ -156,10 +156,16 @@ virtual QColor getPixelColor(QPoint& point);
|
|||||||
virtual void updateRendererSetting(bool fastRendererOn);
|
virtual void updateRendererSetting(bool fastRendererOn);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief getImageData returns the data of the current image.
|
* \brief getImageData returns the data of the current image (Note: It will allways return a ARGB32bit QImage!).
|
||||||
*/
|
*/
|
||||||
virtual QImage getImageData();
|
virtual QImage getImageData();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief setImageData overwrites the old imageData the new imageData.
|
||||||
|
* \param newData - represents the new imageData
|
||||||
|
*/
|
||||||
|
virtual void setImageData(const QImage& newData);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
IntelliRasterImage::IntelliRasterImage(int width, int height, bool fastRendererOn)
|
IntelliRasterImage::IntelliRasterImage(int width, int height, bool fastRendererOn)
|
||||||
: IntelliImage(width, height, fastRendererOn){
|
: IntelliImage(width, height, fastRendererOn){
|
||||||
TypeOfImage = IntelliImage::ImageType::RASTERIMAGE;
|
TypeOfImage = IntelliImage::ImageType::RASTERIMAGE;
|
||||||
this->fastRenderer = fastRendererOn;
|
this->fastRenderering = fastRendererOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntelliRasterImage::~IntelliRasterImage(){
|
IntelliRasterImage::~IntelliRasterImage(){
|
||||||
@@ -30,7 +30,7 @@ QImage IntelliRasterImage::getDisplayable(int alpha){
|
|||||||
|
|
||||||
QImage IntelliRasterImage::getDisplayable(const QSize& displaySize, int alpha){
|
QImage IntelliRasterImage::getDisplayable(const QSize& displaySize, int alpha){
|
||||||
QImage copy = imageData;
|
QImage copy = imageData;
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
copy = copy.convertToFormat(QImage::Format_ARGB32);
|
copy = copy.convertToFormat(QImage::Format_ARGB32);
|
||||||
}
|
}
|
||||||
for(int y = 0; y<copy.height(); y++) {
|
for(int y = 0; y<copy.height(); y++) {
|
||||||
@@ -40,7 +40,7 @@ QImage IntelliRasterImage::getDisplayable(const QSize& displaySize, int alpha){
|
|||||||
copy.setPixelColor(x,y, clr);
|
copy.setPixelColor(x,y, clr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
copy = copy.convertToFormat(QImage::Format_Indexed8);
|
copy = copy.convertToFormat(QImage::Format_Indexed8);
|
||||||
}
|
}
|
||||||
return copy.scaled(displaySize,Qt::IgnoreAspectRatio);
|
return copy.scaled(displaySize,Qt::IgnoreAspectRatio);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
IntelliShapedImage::IntelliShapedImage(int width, int height, bool fastRendererOn)
|
IntelliShapedImage::IntelliShapedImage(int width, int height, bool fastRendererOn)
|
||||||
: IntelliRasterImage(width, height, fastRendererOn){
|
: IntelliRasterImage(width, height, fastRendererOn){
|
||||||
TypeOfImage = IntelliImage::ImageType::SHAPEDIMAGE;
|
TypeOfImage = IntelliImage::ImageType::SHAPEDIMAGE;
|
||||||
this->fastRenderer = fastRendererOn;
|
this->fastRenderering = fastRendererOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntelliShapedImage::~IntelliShapedImage(){
|
IntelliShapedImage::~IntelliShapedImage(){
|
||||||
@@ -27,7 +27,7 @@ IntelliImage* IntelliShapedImage::getDeepCopy(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void IntelliShapedImage::calculateVisiblity(){
|
void IntelliShapedImage::calculateVisiblity(){
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = imageData.convertToFormat(QImage::Format_ARGB32);
|
this->imageData = imageData.convertToFormat(QImage::Format_ARGB32);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ void IntelliShapedImage::calculateVisiblity(){
|
|||||||
imageData.setPixelColor(x,y,clr);
|
imageData.setPixelColor(x,y,clr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -59,14 +59,14 @@ void IntelliShapedImage::calculateVisiblity(){
|
|||||||
imageData.setPixelColor(x,y,clr);
|
imageData.setPixelColor(x,y,clr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage IntelliShapedImage::getDisplayable(const QSize& displaySize, int alpha){
|
QImage IntelliShapedImage::getDisplayable(const QSize& displaySize, int alpha){
|
||||||
QImage copy = imageData;
|
QImage copy = imageData;
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
copy = copy.convertToFormat(QImage::Format_ARGB32);
|
copy = copy.convertToFormat(QImage::Format_ARGB32);
|
||||||
}
|
}
|
||||||
for(int y = 0; y<copy.height(); y++) {
|
for(int y = 0; y<copy.height(); y++) {
|
||||||
@@ -76,7 +76,7 @@ QImage IntelliShapedImage::getDisplayable(const QSize& displaySize, int alpha){
|
|||||||
copy.setPixelColor(x,y, clr);
|
copy.setPixelColor(x,y, clr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(fastRenderer){
|
if(fastRenderering){
|
||||||
copy = copy.convertToFormat(QImage::Format_Indexed8);
|
copy = copy.convertToFormat(QImage::Format_Indexed8);
|
||||||
}
|
}
|
||||||
return copy.scaled(displaySize,Qt::IgnoreAspectRatio);
|
return copy.scaled(displaySize,Qt::IgnoreAspectRatio);
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ IntelliRenderSettings::IntelliRenderSettings()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IntelliRenderSettings::getFastRenderer(){
|
void IntelliRenderSettings::setFastRendering(bool Updatedsetting){
|
||||||
return fastRenderer;
|
this->fastRenderering = Updatedsetting;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IntelliRenderSettings::isFastRenderering(){
|
||||||
|
return fastRenderering;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,14 +7,19 @@ class IntelliRenderSettings
|
|||||||
public:
|
public:
|
||||||
IntelliRenderSettings();
|
IntelliRenderSettings();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief setFastRendering sets fastRendering to Updatedsetting.
|
||||||
|
* \param Updatedsetting - Represents the new value for the Fast Rendering Flag.
|
||||||
|
*/
|
||||||
|
void setFastRendering(bool Updatedsetting);
|
||||||
/*!
|
/*!
|
||||||
* \brief The getfastRenderer gets the value of the flag for the fastRenderer setting.
|
* \brief The getfastRenderer gets the value of the flag for the fastRenderer setting.
|
||||||
* \return Returns true if fastRenderer is active else false
|
* \return Returns true if fastRenderer is active else false
|
||||||
*/
|
*/
|
||||||
bool getFastRenderer();
|
bool isFastRenderering();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool fastRenderer = true;
|
bool fastRenderering = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INTELLIRENDERSETTINGS_H
|
#endif // INTELLIRENDERSETTINGS_H
|
||||||
|
|||||||
@@ -21,27 +21,36 @@
|
|||||||
PaintingArea::PaintingArea(int maxWidth, int maxHeight, QWidget*parent)
|
PaintingArea::PaintingArea(int maxWidth, int maxHeight, QWidget*parent)
|
||||||
: QWidget(parent){
|
: QWidget(parent){
|
||||||
this->Tool = nullptr;
|
this->Tool = nullptr;
|
||||||
this->setLayerDimensions(maxWidth, maxHeight);
|
this->setLayerDimensions(maxWidth, maxHeight);
|
||||||
this->addLayer(200,200,0,0,IntelliImage::ImageType::SHAPEDIMAGE);
|
//this->addLayer(200,200,0,0,IntelliImage::ImageType::SHAPEDIMAGE);
|
||||||
layerBundle[0].image->drawPlain(QColor(0,0,255,255));
|
//layerBundle[0].image->drawPlain(QColor(0,0,255,255));
|
||||||
std::vector<QPoint> polygon;
|
//std::vector<QPoint> polygon;
|
||||||
polygon.push_back(QPoint(100,000));
|
//polygon.push_back(QPoint(100,000));
|
||||||
polygon.push_back(QPoint(200,100));
|
//polygon.push_back(QPoint(200,100));
|
||||||
polygon.push_back(QPoint(100,200));
|
//polygon.push_back(QPoint(100,200));
|
||||||
polygon.push_back(QPoint(000,100));
|
//polygon.push_back(QPoint(000,100));
|
||||||
layerBundle[0].image->setPolygon(polygon);
|
//layerBundle[0].image->setPolygon(polygon);
|
||||||
|
//
|
||||||
|
//this->addLayer(200,200,150,150,IntelliImage::ImageType::RASTERIMAGE);
|
||||||
|
//layerBundle[1].image->drawPlain(QColor(0,255,0,255));
|
||||||
|
//layerBundle[1].alpha=200;
|
||||||
|
|
||||||
this->addLayer(200,200,150,150,IntelliImage::ImageType::RASTERIMAGE);
|
activeLayer=-1;
|
||||||
layerBundle[1].image->drawPlain(QColor(0,255,0,255));
|
|
||||||
layerBundle[1].alpha=200;
|
|
||||||
|
|
||||||
activeLayer=0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PaintingArea::~PaintingArea(){
|
PaintingArea::~PaintingArea(){
|
||||||
delete Tool;
|
delete Tool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PaintingArea::setRenderSettings(bool isFastRenderingOn){
|
||||||
|
if(isFastRenderingOn != renderSettings.isFastRenderering()){
|
||||||
|
renderSettings.setFastRendering(isFastRenderingOn);
|
||||||
|
for(auto& layer : layerBundle){
|
||||||
|
layer.image->updateRendererSetting(isFastRenderingOn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PaintingArea::setLayerDimensions(int maxWidth, int maxHeight){
|
void PaintingArea::setLayerDimensions(int maxWidth, int maxHeight){
|
||||||
//set standart parameter
|
//set standart parameter
|
||||||
this->maxWidth = maxWidth;
|
this->maxWidth = maxWidth;
|
||||||
@@ -60,9 +69,9 @@ int PaintingArea::addLayer(int width, int height, int widthOffset, int heightOff
|
|||||||
newLayer.widthOffset = widthOffset;
|
newLayer.widthOffset = widthOffset;
|
||||||
newLayer.heightOffset = heightOffset;
|
newLayer.heightOffset = heightOffset;
|
||||||
if(type==IntelliImage::ImageType::RASTERIMAGE) {
|
if(type==IntelliImage::ImageType::RASTERIMAGE) {
|
||||||
newLayer.image = new IntelliRasterImage(width,height,renderSettings.getFastRenderer());
|
newLayer.image = new IntelliRasterImage(width,height,renderSettings.isFastRenderering());
|
||||||
}else if(type==IntelliImage::ImageType::SHAPEDIMAGE) {
|
}else if(type==IntelliImage::ImageType::SHAPEDIMAGE) {
|
||||||
newLayer.image = new IntelliShapedImage(width, height, renderSettings.getFastRenderer());
|
newLayer.image = new IntelliShapedImage(width, height, renderSettings.isFastRenderering());
|
||||||
}
|
}
|
||||||
newLayer.alpha = 255;
|
newLayer.alpha = 255;
|
||||||
this->layerBundle.push_back(newLayer);
|
this->layerBundle.push_back(newLayer);
|
||||||
@@ -74,9 +83,12 @@ int PaintingArea::addLayer(int width, int height, int widthOffset, int heightOff
|
|||||||
void PaintingArea::deleteLayer(int idx){
|
void PaintingArea::deleteLayer(int idx){
|
||||||
if(idx<static_cast<int>(layerBundle.size())) {
|
if(idx<static_cast<int>(layerBundle.size())) {
|
||||||
this->layerBundle.erase(layerBundle.begin()+idx);
|
this->layerBundle.erase(layerBundle.begin()+idx);
|
||||||
if(activeLayer>=idx && activeLayer != 0) {
|
if(activeLayer>=idx) {
|
||||||
activeLayer--;
|
activeLayer--;
|
||||||
}
|
}
|
||||||
|
if(activeLayer < 0 && layerBundle.size()){
|
||||||
|
activeLayer=0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,6 +265,8 @@ std::vector<QPoint> PaintingArea::getPolygonDataOfRealLayer(){
|
|||||||
// left button and if so store the current position
|
// left button and if so store the current position
|
||||||
// Set that we are currently drawing
|
// Set that we are currently drawing
|
||||||
void PaintingArea::mousePressEvent(QMouseEvent*event){
|
void PaintingArea::mousePressEvent(QMouseEvent*event){
|
||||||
|
if(this->activeLayer < 0)
|
||||||
|
return;
|
||||||
if(Tool == nullptr)
|
if(Tool == nullptr)
|
||||||
return;
|
return;
|
||||||
int x = event->x()-layerBundle[static_cast<unsigned long long>(activeLayer)].widthOffset;
|
int x = event->x()-layerBundle[static_cast<unsigned long long>(activeLayer)].widthOffset;
|
||||||
@@ -269,6 +283,8 @@ void PaintingArea::mousePressEvent(QMouseEvent*event){
|
|||||||
// we call the drawline function which draws a line
|
// we call the drawline function which draws a line
|
||||||
// from the last position to the current
|
// from the last position to the current
|
||||||
void PaintingArea::mouseMoveEvent(QMouseEvent*event){
|
void PaintingArea::mouseMoveEvent(QMouseEvent*event){
|
||||||
|
if(this->activeLayer < 0)
|
||||||
|
return;
|
||||||
if(Tool == nullptr)
|
if(Tool == nullptr)
|
||||||
return;
|
return;
|
||||||
int x = event->x()-layerBundle[static_cast<unsigned long long>(activeLayer)].widthOffset;
|
int x = event->x()-layerBundle[static_cast<unsigned long long>(activeLayer)].widthOffset;
|
||||||
@@ -279,7 +295,9 @@ void PaintingArea::mouseMoveEvent(QMouseEvent*event){
|
|||||||
|
|
||||||
// If the button is released we set variables to stop drawing
|
// If the button is released we set variables to stop drawing
|
||||||
void PaintingArea::mouseReleaseEvent(QMouseEvent*event){
|
void PaintingArea::mouseReleaseEvent(QMouseEvent*event){
|
||||||
if(Tool == nullptr)
|
if(this->activeLayer < 0)
|
||||||
|
return;
|
||||||
|
if(Tool == nullptr)
|
||||||
return;
|
return;
|
||||||
int x = event->x()-layerBundle[static_cast<unsigned long long>(activeLayer)].widthOffset;
|
int x = event->x()-layerBundle[static_cast<unsigned long long>(activeLayer)].widthOffset;
|
||||||
int y = event->y()-layerBundle[static_cast<unsigned long long>(activeLayer)].heightOffset;
|
int y = event->y()-layerBundle[static_cast<unsigned long long>(activeLayer)].heightOffset;
|
||||||
@@ -292,7 +310,9 @@ void PaintingArea::mouseReleaseEvent(QMouseEvent*event){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::wheelEvent(QWheelEvent*event){
|
void PaintingArea::wheelEvent(QWheelEvent*event){
|
||||||
if(this->Tool != nullptr) {
|
if(this->activeLayer < 0)
|
||||||
|
return;
|
||||||
|
if(this->Tool != nullptr) {
|
||||||
QPoint numDegrees = event->angleDelta() / 8;
|
QPoint numDegrees = event->angleDelta() / 8;
|
||||||
if(!numDegrees.isNull()) {
|
if(!numDegrees.isNull()) {
|
||||||
QPoint numSteps = numDegrees / 15;
|
QPoint numSteps = numDegrees / 15;
|
||||||
@@ -373,7 +393,7 @@ void PaintingArea::drawLayers(bool forSaving){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::createTempTopLayer(int idx){
|
bool PaintingArea::createTempTopLayer(int idx){
|
||||||
if(idx>=0) {
|
if(idx>=0) {
|
||||||
LayerObject newLayer;
|
LayerObject newLayer;
|
||||||
newLayer.alpha = 255;
|
newLayer.alpha = 255;
|
||||||
@@ -383,7 +403,9 @@ void PaintingArea::createTempTopLayer(int idx){
|
|||||||
newLayer.widthOffset = layerBundle[static_cast<unsigned long long>(idx)].widthOffset;
|
newLayer.widthOffset = layerBundle[static_cast<unsigned long long>(idx)].widthOffset;
|
||||||
newLayer.image = layerBundle[static_cast<unsigned long long>(idx)].image->getDeepCopy();
|
newLayer.image = layerBundle[static_cast<unsigned long long>(idx)].image->getDeepCopy();
|
||||||
layerBundle.insert(layerBundle.begin()+idx+1,newLayer);
|
layerBundle.insert(layerBundle.begin()+idx+1,newLayer);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntelliTool* PaintingArea::copyActiveTool(){
|
IntelliTool* PaintingArea::copyActiveTool(){
|
||||||
@@ -404,5 +426,8 @@ int PaintingArea::getNumberOfActiveLayer(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
IntelliImage* PaintingArea::getImageOfActiveLayer(){
|
IntelliImage* PaintingArea::getImageOfActiveLayer(){
|
||||||
|
if(activeLayer<0){
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
return layerBundle[activeLayer].image;
|
return layerBundle[activeLayer].image;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,12 @@ public:
|
|||||||
|
|
||||||
// Handles all events
|
// Handles all events
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief setRenderSettings updates all Images to the new Rendersetting.
|
||||||
|
* \param isFastRenderingOn is the new given flag for the FastRenderer.
|
||||||
|
*/
|
||||||
|
void setRenderSettings(bool isFastRenderingOn);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The open method is used for loading a picture into the current layer
|
* \brief The open method is used for loading a picture into the current layer
|
||||||
* \param fileName - Path and filename which are used to determine where the to-be-opened file is stored
|
* \param fileName - Path and filename which are used to determine where the to-be-opened file is stored
|
||||||
@@ -211,7 +217,7 @@ private:
|
|||||||
|
|
||||||
IntelliRenderSettings renderSettings;
|
IntelliRenderSettings renderSettings;
|
||||||
IntelliTool* Tool;
|
IntelliTool* Tool;
|
||||||
IntelliPhotoGui* DumpyGui;
|
IntelliPhotoGui* DummyGui;
|
||||||
|
|
||||||
std::vector<LayerObject> layerBundle;
|
std::vector<LayerObject> layerBundle;
|
||||||
int activeLayer=-1;
|
int activeLayer=-1;
|
||||||
@@ -221,8 +227,7 @@ private:
|
|||||||
void resizeLayer(QImage *image_res, const QSize &newSize);
|
void resizeLayer(QImage *image_res, const QSize &newSize);
|
||||||
|
|
||||||
// Helper for Tool
|
// Helper for Tool
|
||||||
// TODO: Always create this layer on top and return the id here!
|
bool createTempTopLayer(int idx);
|
||||||
void createTempTopLayer(int idx);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ void IntelliTool::onMouseRightReleased(int x, int y){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void IntelliTool::onMouseLeftPressed(int x, int y){
|
void IntelliTool::onMouseLeftPressed(int x, int y){
|
||||||
this->isDrawing=true;
|
this->isDrawing=this->createToolLayer();
|
||||||
//create drawing layer
|
if(isDrawing){
|
||||||
this->createToolLayer();
|
Canvas->image->calculateVisiblity();
|
||||||
Canvas->image->calculateVisiblity();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliTool::onMouseLeftReleased(int x, int y){
|
void IntelliTool::onMouseLeftReleased(int x, int y){
|
||||||
@@ -48,18 +48,23 @@ void IntelliTool::onWheelScrolled(int value){
|
|||||||
//if needed for future general tasks implement in here
|
//if needed for future general tasks implement in here
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliTool::createToolLayer(){
|
bool IntelliTool::createToolLayer(){
|
||||||
Area->createTempTopLayer(Area->activeLayer);
|
if(Area->createTempTopLayer(Area->activeLayer)){
|
||||||
this->activeLayer=&Area->layerBundle[static_cast<unsigned long long>(Area->activeLayer)];
|
this->activeLayer=&Area->layerBundle[static_cast<unsigned long long>(Area->activeLayer)];
|
||||||
this->Canvas=&Area->layerBundle[static_cast<unsigned long long>(Area->activeLayer+1)];
|
this->Canvas=&Area->layerBundle[static_cast<unsigned long long>(Area->activeLayer+1)];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliTool::mergeToolLayer(){
|
void IntelliTool::mergeToolLayer(){
|
||||||
QColor clr_0;
|
QColor clr_0;
|
||||||
QColor clr_1;
|
QColor clr_1;
|
||||||
|
QImage updatedImage = activeLayer->image->getImageData();
|
||||||
|
|
||||||
for(int y=0; y<activeLayer->height; y++) {
|
for(int y=0; y<activeLayer->height; y++) {
|
||||||
for(int x=0; x<activeLayer->width; x++) {
|
for(int x=0; x<activeLayer->width; x++) {
|
||||||
clr_0=activeLayer->image->imageData.pixelColor(x,y);
|
clr_0=updatedImage.pixelColor(x,y);
|
||||||
clr_1=Canvas->image->imageData.pixelColor(x,y);
|
clr_1=Canvas->image->imageData.pixelColor(x,y);
|
||||||
float t = static_cast<float>(clr_1.alpha())/255.f;
|
float t = static_cast<float>(clr_1.alpha())/255.f;
|
||||||
int r =static_cast<int>(static_cast<float>(clr_1.red())*(t)+static_cast<float>(clr_0.red())*(1.f-t)+0.5f);
|
int r =static_cast<int>(static_cast<float>(clr_1.red())*(t)+static_cast<float>(clr_0.red())*(1.f-t)+0.5f);
|
||||||
@@ -71,10 +76,11 @@ void IntelliTool::mergeToolLayer(){
|
|||||||
clr_0.setBlue(b);
|
clr_0.setBlue(b);
|
||||||
clr_0.setAlpha(a);
|
clr_0.setAlpha(a);
|
||||||
|
|
||||||
activeLayer->image->imageData.setPixelColor(x, y, clr_0);
|
updatedImage.setPixelColor(x, y, clr_0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Area->DumpyGui->UpdateGui();
|
activeLayer->image->setImageData(updatedImage);
|
||||||
|
Area->DummyGui->UpdateGui();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliTool::deleteToolLayer(){
|
void IntelliTool::deleteToolLayer(){
|
||||||
|
|||||||
@@ -25,8 +25,9 @@ enum class Tooltype {
|
|||||||
private:
|
private:
|
||||||
/*!
|
/*!
|
||||||
* \brief A function that creates a layer to draw on.
|
* \brief A function that creates a layer to draw on.
|
||||||
|
* \return Returns if a layer could be created
|
||||||
*/
|
*/
|
||||||
void createToolLayer();
|
bool createToolLayer();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief A function that merges the drawing- and the active- layer.
|
* \brief A function that merges the drawing- and the active- layer.
|
||||||
|
|||||||
@@ -57,10 +57,12 @@ void IntelliToolCircle::onMouseRightReleased(int x, int y){
|
|||||||
|
|
||||||
void IntelliToolCircle::onMouseLeftPressed(int x, int y){
|
void IntelliToolCircle::onMouseLeftPressed(int x, int y){
|
||||||
IntelliTool::onMouseLeftPressed(x,y);
|
IntelliTool::onMouseLeftPressed(x,y);
|
||||||
this->centerPoint=QPoint(x,y);
|
if(this->isDrawing){
|
||||||
int radius = 1;
|
this->centerPoint=QPoint(x,y);
|
||||||
drawCircle(radius);
|
int radius = 1;
|
||||||
Canvas->image->calculateVisiblity();
|
drawCircle(radius);
|
||||||
|
Canvas->image->calculateVisiblity();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliToolCircle::onMouseLeftReleased(int x, int y){
|
void IntelliToolCircle::onMouseLeftReleased(int x, int y){
|
||||||
|
|||||||
@@ -15,22 +15,10 @@
|
|||||||
viewBox="0 0 67.733332 67.733335"
|
viewBox="0 0 67.733332 67.733335"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg8"
|
id="svg8"
|
||||||
sodipodi:docname="flood-fill-tool.svg"
|
sodipodi:docname="magic-wand-tool.svg"
|
||||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||||
<defs
|
<defs
|
||||||
id="defs2">
|
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
|
<linearGradient
|
||||||
inkscape:collect="always"
|
inkscape:collect="always"
|
||||||
id="linearGradient36">
|
id="linearGradient36">
|
||||||
@@ -52,15 +40,6 @@
|
|||||||
x2="-13.131983"
|
x2="-13.131983"
|
||||||
y2="106.49742"
|
y2="106.49742"
|
||||||
gradientUnits="userSpaceOnUse" />
|
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>
|
</defs>
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
||||||
id="base"
|
id="base"
|
||||||
@@ -70,8 +49,8 @@
|
|||||||
inkscape:pageopacity="0.0"
|
inkscape:pageopacity="0.0"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:zoom="2.8"
|
inkscape:zoom="2.8"
|
||||||
inkscape:cx="178.00664"
|
inkscape:cx="154.79235"
|
||||||
inkscape:cy="120.50274"
|
inkscape:cy="122.64559"
|
||||||
inkscape:document-units="mm"
|
inkscape:document-units="mm"
|
||||||
inkscape:current-layer="g4716"
|
inkscape:current-layer="g4716"
|
||||||
showgrid="false"
|
showgrid="false"
|
||||||
@@ -102,93 +81,89 @@
|
|||||||
transform="translate(0,-229.26665)">
|
transform="translate(0,-229.26665)">
|
||||||
<g
|
<g
|
||||||
id="g4716">
|
id="g4716">
|
||||||
<rect
|
<g
|
||||||
style="fill:url(#linearGradient4748);fill-opacity:1;stroke:#000000;stroke-width:2.54346728;stroke-miterlimit:4;stroke-dasharray:none"
|
id="g4767"
|
||||||
id="rect4736"
|
transform="translate(-4.5357143,7.0870536)">
|
||||||
width="20.992056"
|
<rect
|
||||||
height="38.493938"
|
transform="rotate(45)"
|
||||||
x="268.06161"
|
ry="1.889881"
|
||||||
y="65.299561"
|
y="137.33192"
|
||||||
transform="matrix(0.37877425,0.9254891,-0.96183685,0.2736236,0,0)" />
|
x="203.35738"
|
||||||
<rect
|
height="53.483627"
|
||||||
y="199.89908"
|
width="10.299852"
|
||||||
x="116.56168"
|
id="rect4758"
|
||||||
height="29.387648"
|
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.7175684;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
width="34.49033"
|
<rect
|
||||||
id="rect4710"
|
transform="rotate(45)"
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2.11666656;stroke-miterlimit:4;stroke-dasharray:none"
|
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.8319869;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
transform="rotate(22.139383)" />
|
id="rect4760"
|
||||||
<ellipse
|
width="9.7328882"
|
||||||
ry="3.6608384"
|
height="2.8348179"
|
||||||
rx="17.12623"
|
x="203.64085"
|
||||||
cy="229.80646"
|
y="148.6712" />
|
||||||
cx="133.85408"
|
<rect
|
||||||
id="path4712"
|
transform="rotate(45)"
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2.07105064;stroke-miterlimit:4;stroke-dasharray:none"
|
y="141.20618"
|
||||||
transform="rotate(22.139383)" />
|
x="203.64085"
|
||||||
<rect
|
height="2.8348179"
|
||||||
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.57643586;stroke-miterlimit:4;stroke-dasharray:none"
|
width="9.7328882"
|
||||||
id="rect4722"
|
id="rect4762"
|
||||||
width="6.4093542"
|
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.8319869;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||||
height="5.9942107"
|
</g>
|
||||||
x="106.55282"
|
<path
|
||||||
y="220.71335"
|
sodipodi:type="star"
|
||||||
transform="matrix(0.89502052,0.44602497,-0.31493366,0.94911369,0,0)"
|
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:2.11666656;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
ry="2.9971054" />
|
id="path4769"
|
||||||
<rect
|
sodipodi:sides="5"
|
||||||
ry="4.9373565"
|
sodipodi:cx="44.223213"
|
||||||
transform="matrix(0.76230952,0.64721263,-0.19117303,0.98155635,0,0)"
|
sodipodi:cy="239.92558"
|
||||||
y="211.36087"
|
sodipodi:r1="8.624361"
|
||||||
x="91.973289"
|
sodipodi:r2="4.3121805"
|
||||||
height="9.8747129"
|
sodipodi:arg1="1.0040671"
|
||||||
width="7.5251632"
|
sodipodi:arg2="1.6323856"
|
||||||
id="rect4726"
|
inkscape:flatsided="false"
|
||||||
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.80167449;stroke-miterlimit:4;stroke-dasharray:none" />
|
inkscape:rounded="0"
|
||||||
<rect
|
inkscape:randomized="0"
|
||||||
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.68775666;stroke-miterlimit:4;stroke-dasharray:none"
|
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"
|
||||||
id="rect4728"
|
inkscape:transform-center-x="2.6385383"
|
||||||
width="6.9141498"
|
inkscape:transform-center-y="1.2565374"
|
||||||
height="7.9099746"
|
transform="rotate(-21.763247,66.493886,211.70978)" />
|
||||||
x="106.98909"
|
<path
|
||||||
y="208.27184"
|
transform="matrix(-0.16940831,-0.61726905,0.61726905,-0.16940831,-99.981719,307.02239)"
|
||||||
transform="matrix(0.82967592,0.55824535,-0.238658,0.97110368,0,0)"
|
inkscape:transform-center-y="1.5995691"
|
||||||
ry="3.9549873" />
|
inkscape:transform-center-x="-0.47805579"
|
||||||
<rect
|
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"
|
||||||
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.83867002;stroke-miterlimit:4;stroke-dasharray:none"
|
inkscape:randomized="0"
|
||||||
id="rect4732"
|
inkscape:rounded="0"
|
||||||
width="7.7389083"
|
inkscape:flatsided="false"
|
||||||
height="10.508647"
|
sodipodi:arg2="1.6323856"
|
||||||
x="99.318977"
|
sodipodi:arg1="1.0040671"
|
||||||
y="206.74135"
|
sodipodi:r2="4.3121805"
|
||||||
transform="matrix(0.74125487,0.67122367,-0.1796405,0.98373233,0,0)"
|
sodipodi:r1="8.624361"
|
||||||
ry="5.2543235" />
|
sodipodi:cy="239.92558"
|
||||||
<rect
|
sodipodi:cx="44.223213"
|
||||||
ry="4.9687924"
|
sodipodi:sides="5"
|
||||||
transform="matrix(0.76020136,0.64968753,-0.18996354,0.98179115,0,0)"
|
id="path4771"
|
||||||
y="213.06801"
|
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:2.11666656;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
x="82.413681"
|
sodipodi:type="star" />
|
||||||
height="9.9375849"
|
<path
|
||||||
width="7.5460315"
|
sodipodi:type="star"
|
||||||
id="rect4734"
|
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:2.11666656;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.80533689;stroke-miterlimit:4;stroke-dasharray:none" />
|
id="path4773"
|
||||||
<rect
|
sodipodi:sides="5"
|
||||||
ry="2.9971054"
|
sodipodi:cx="44.223213"
|
||||||
transform="matrix(0.89502052,0.44602497,-0.31493366,0.94911369,0,0)"
|
sodipodi:cy="239.92558"
|
||||||
y="219.89731"
|
sodipodi:r1="8.624361"
|
||||||
x="128.72516"
|
sodipodi:r2="4.3121805"
|
||||||
height="5.9942107"
|
sodipodi:arg1="1.0040671"
|
||||||
width="6.4093542"
|
sodipodi:arg2="1.6323856"
|
||||||
id="rect4738"
|
inkscape:flatsided="false"
|
||||||
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.57643586;stroke-miterlimit:4;stroke-dasharray:none" />
|
inkscape:rounded="0"
|
||||||
<rect
|
inkscape:randomized="0"
|
||||||
style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:0.61344987;stroke-miterlimit:4;stroke-dasharray:none"
|
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"
|
||||||
id="rect4740"
|
inkscape:transform-center-x="0.0027046201"
|
||||||
width="6.5649834"
|
inkscape:transform-center-y="1.1149197"
|
||||||
height="6.6277919"
|
transform="matrix(0.25199367,-0.58840415,0.58840415,0.25199367,-99.952707,231.42813)" />
|
||||||
x="107.49622"
|
|
||||||
y="215.86592"
|
|
||||||
transform="matrix(0.87380318,0.48627976,-0.28482771,0.95857873,0,0)"
|
|
||||||
ry="3.3138959" />
|
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.0 KiB |
99
src/icons/line-tool.svg
Normal file
99
src/icons/line-tool.svg
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
<?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="line-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="716"
|
||||||
|
inkscape:window-height="405"
|
||||||
|
inkscape:window-x="969"
|
||||||
|
inkscape:window-y="326"
|
||||||
|
inkscape:window-maximized="0" />
|
||||||
|
<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:none;stroke:#000000;stroke-width:2.117;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
d="M 7.8430058,289.81843 60.854166,236.80727"
|
||||||
|
id="path845"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<circle
|
||||||
|
r="2.5985863"
|
||||||
|
cy="236.66553"
|
||||||
|
cx="60.712429"
|
||||||
|
id="circle4574"
|
||||||
|
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="path4572"
|
||||||
|
cx="7.8902526"
|
||||||
|
cy="289.86566"
|
||||||
|
r="2.5985863" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -1,169 +0,0 @@
|
|||||||
<?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>
|
|
||||||
|
Before Width: | Height: | Size: 6.0 KiB |
194
src/icons/plain-tool.svg
Normal file
194
src/icons/plain-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 |
Reference in New Issue
Block a user