Uncrustified Files

This commit is contained in:
2020-01-13 19:59:30 +01:00
parent 048fae53fb
commit 6fec7c26bf
10 changed files with 449 additions and 449 deletions

View File

@@ -5,9 +5,9 @@
#include <QDebug>
IntelliShapedImage::IntelliShapedImage(int width, int height, bool fastRendererOn)
: IntelliRasterImage(width, height, fastRendererOn){
TypeOfImage = IntelliImage::ImageType::SHAPEDIMAGE;
this->fastRenderering = fastRendererOn;
: IntelliRasterImage(width, height, fastRendererOn){
TypeOfImage = IntelliImage::ImageType::SHAPEDIMAGE;
this->fastRenderering = fastRendererOn;
}
IntelliShapedImage::~IntelliShapedImage(){
@@ -27,9 +27,9 @@ IntelliImage* IntelliShapedImage::getDeepCopy(){
}
void IntelliShapedImage::calculateVisiblity(){
if(fastRenderering){
this->imageData = imageData.convertToFormat(QImage::Format_ARGB32);
}
if(fastRenderering) {
this->imageData = imageData.convertToFormat(QImage::Format_ARGB32);
}
if(polygonData.size()<=2) {
QColor clr;
@@ -40,9 +40,9 @@ void IntelliShapedImage::calculateVisiblity(){
imageData.setPixelColor(x,y,clr);
}
}
if(fastRenderering){
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
}
if(fastRenderering) {
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
}
return;
}
QColor clr;
@@ -59,16 +59,16 @@ void IntelliShapedImage::calculateVisiblity(){
imageData.setPixelColor(x,y,clr);
}
}
if(fastRenderering){
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
}
if(fastRenderering) {
this->imageData = this->imageData.convertToFormat(QImage::Format_Indexed8);
}
}
QImage IntelliShapedImage::getDisplayable(const QSize& displaySize, int alpha){
QImage copy = imageData;
if(fastRenderering){
copy = copy.convertToFormat(QImage::Format_ARGB32);
}
if(fastRenderering) {
copy = copy.convertToFormat(QImage::Format_ARGB32);
}
for(int y = 0; y<copy.height(); y++) {
for(int x = 0; x<copy.width(); x++) {
QColor clr = copy.pixelColor(x,y);
@@ -76,9 +76,9 @@ QImage IntelliShapedImage::getDisplayable(const QSize& displaySize, int alpha){
copy.setPixelColor(x,y, clr);
}
}
if(fastRenderering){
copy = copy.convertToFormat(QImage::Format_Indexed8);
}
if(fastRenderering) {
copy = copy.convertToFormat(QImage::Format_Indexed8);
}
return copy.scaled(displaySize,Qt::IgnoreAspectRatio);
}