mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-15 04:40:37 +02:00
newLayer
This commit is contained in:
@@ -27,6 +27,7 @@ PaintingArea::PaintingArea(int maxWidth, int maxHeight, QWidget *parent)
|
||||
this->addLayer(200,200,150,150);
|
||||
layerStructure[1].image->floodFill(QColor(0,255,0,255));
|
||||
layerStructure[1].alpha=200;
|
||||
|
||||
activeLayer=1;
|
||||
}
|
||||
|
||||
@@ -50,7 +51,7 @@ void PaintingArea::setUp(int maxWidth, int maxHeight){
|
||||
myPenColor = Qt::blue;
|
||||
}
|
||||
|
||||
void PaintingArea::addLayer(int width, int height, int widthOffset, int heightOffset, ImageType type){
|
||||
int PaintingArea::addLayer(int width, int height, int widthOffset, int heightOffset, ImageType type){
|
||||
LayerObject newLayer;
|
||||
newLayer.width = width;
|
||||
newLayer.height = height;
|
||||
@@ -63,7 +64,7 @@ void PaintingArea::addLayer(int width, int height, int widthOffset, int heightOf
|
||||
}
|
||||
newLayer.alpha = 255;
|
||||
this->layerStructure.push_back(newLayer);
|
||||
|
||||
return layerStructure.size()-1;
|
||||
}
|
||||
|
||||
void PaintingArea::deleteLayer(int index){
|
||||
@@ -180,7 +181,7 @@ void PaintingArea::getMoveLeft(int a){
|
||||
}
|
||||
|
||||
void PaintingArea::getMoveLayerUp(){
|
||||
if(activeLayer<layerStructure.size() && activeLayer>=0){
|
||||
if(activeLayer<layerStructure.size()-1 && activeLayer>=0){
|
||||
std::swap(layerStructure[activeLayer], layerStructure[activeLayer+1]);
|
||||
activeLayer++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user