mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-14 12:20:32 +02:00
Recht unschöne Modularität der Tools
This commit is contained in:
@@ -58,6 +58,7 @@ int PaintingArea::addLayer(int width, int height, int widthOffset, int heightOff
|
||||
return static_cast<int>(layerBundle.size())-1;
|
||||
}
|
||||
|
||||
|
||||
void PaintingArea::deleteLayer(int index){
|
||||
if(index<static_cast<int>(layerBundle.size())){
|
||||
this->layerBundle.erase(layerBundle.begin()+index);
|
||||
@@ -217,6 +218,7 @@ void PaintingArea::activateLowerLayer(){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PaintingArea::assembleLayers(bool forSaving){
|
||||
if(forSaving){
|
||||
Canvas->fill(Qt::GlobalColor::transparent);
|
||||
@@ -251,3 +253,16 @@ void PaintingArea::assembleLayers(bool forSaving){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PaintingArea::createTempLayerAfter(int idx){
|
||||
if(idx>=0){
|
||||
LayerObject newLayer;
|
||||
newLayer.alpha = layerBundle[idx].alpha;
|
||||
newLayer.hight = layerBundle[idx].hight;
|
||||
newLayer.width = layerBundle[idx].width;
|
||||
newLayer.hightOffset = layerBundle[idx].hightOffset;
|
||||
newLayer.widthOffset = layerBundle[idx].widthOffset;
|
||||
newLayer.image = layerBundle[idx].image->getDeepCopy();
|
||||
layerBundle.insert(layerBundle.begin()+idx+1,newLayer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user