Vollständiger Gradient

Achtung!!! Sehr Rechenaufwendig und im Fastrenderer noch nicht ordentlich nutzbar
This commit is contained in:
AshBastian
2020-01-25 21:54:25 +01:00
parent 2432bb0568
commit 9f6fe965ec
6 changed files with 122 additions and 19 deletions

View File

@@ -39,7 +39,7 @@ LayerObject::LayerObject(const LayerObject& layer){
PaintingArea::PaintingArea(int maxWidth, int maxHeight, QWidget*parent)
: QLabel(parent){
this->Tool = new IntelliToolGradient(this,&colorPicker,&Toolsettings);
this->Tool = nullptr;
this->setLayerDimensions(maxWidth, maxHeight);
activeLayer = -1;
}
@@ -275,6 +275,11 @@ void PaintingArea::createFloodFillTool(){
Tool = new IntelliToolFloodFill(this, &colorPicker, &Toolsettings);
}
void PaintingArea::createGradientTool(){
delete this->Tool;
Tool = new IntelliToolGradient(this, &colorPicker, &Toolsettings);
}
int PaintingArea::getWidthOfActive(){
return this->layerBundle[static_cast<size_t>(activeLayer)].width;
}

View File

@@ -183,6 +183,7 @@ void createRectangleTool();
void createCircleTool();
void createPolygonTool();
void createFloodFillTool();
void createGradientTool();
/*!
* \brief The getWidthOfActive gets the horizontal dimensions of the active layer