Merge branch 'dev' into UnitTesting

This commit is contained in:
2020-01-16 10:45:23 +01:00
14 changed files with 717 additions and 621 deletions

View File

@@ -4,9 +4,9 @@
#include <QDebug>
IntelliRasterImage::IntelliRasterImage(int width, int height, bool fastRendererOn)
: IntelliImage(width, height, fastRendererOn){
TypeOfImage = IntelliImage::ImageType::RASTERIMAGE;
this->fastRenderering = fastRendererOn;
: IntelliImage(width, height, fastRendererOn){
TypeOfImage = IntelliImage::ImageType::RASTERIMAGE;
this->fastRenderering = fastRendererOn;
}
IntelliRasterImage::~IntelliRasterImage(){
@@ -30,9 +30,9 @@ QImage IntelliRasterImage::getDisplayable(int alpha){
QImage IntelliRasterImage::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);
@@ -40,9 +40,9 @@ QImage IntelliRasterImage::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);
}