Restyled project for uncrustify

This commit is contained in:
2019-12-19 18:27:46 +01:00
parent c415a53c83
commit a838e3869f
30 changed files with 1649 additions and 1650 deletions

View File

@@ -1,10 +1,10 @@
#include"Image/IntelliRasterImage.h"
#include<QPainter>
#include<QRect>
#include<QDebug>
#include "Image/IntelliRasterImage.h"
#include <QPainter>
#include <QRect>
#include <QDebug>
IntelliRasterImage::IntelliRasterImage(int weight, int height)
:IntelliImage(weight, height){
: IntelliImage(weight, height){
}
@@ -13,32 +13,32 @@ IntelliRasterImage::~IntelliRasterImage(){
}
IntelliImage* IntelliRasterImage::getDeepCopy(){
IntelliRasterImage* raster = new IntelliRasterImage(imageData.width(), imageData.height());
raster->imageData.fill(Qt::transparent);
return raster;
IntelliRasterImage* raster = new IntelliRasterImage(imageData.width(), imageData.height());
raster->imageData.fill(Qt::transparent);
return raster;
}
void IntelliRasterImage::calculateVisiblity(){
// not used in raster image
// not used in raster image
}
QImage IntelliRasterImage::getDisplayable(int alpha){
return getDisplayable(imageData.size(), alpha);
return getDisplayable(imageData.size(), alpha);
}
QImage IntelliRasterImage::getDisplayable(const QSize& displaySize, int alpha){
QImage copy = imageData;
for(int y = 0; y<copy.height(); y++){
for(int x = 0; x<copy.width(); x++){
QColor clr = copy.pixelColor(x,y);
clr.setAlpha(std::min(alpha, clr.alpha()));
copy.setPixelColor(x,y, clr);
}
}
return copy.scaled(displaySize,Qt::IgnoreAspectRatio);
QImage copy = imageData;
for(int y = 0; y<copy.height(); y++) {
for(int x = 0; x<copy.width(); x++) {
QColor clr = copy.pixelColor(x,y);
clr.setAlpha(std::min(alpha, clr.alpha()));
copy.setPixelColor(x,y, clr);
}
}
return copy.scaled(displaySize,Qt::IgnoreAspectRatio);
}
void IntelliRasterImage::setPolygon(const std::vector<QPoint>& polygonData){
qDebug() << "Raster Image has no polygon data " << polygonData.size() <<"\n";
return;
qDebug() << "Raster Image has no polygon data " << polygonData.size() <<"\n";
return;
}