Only use anti-aliasing when sprites are being downscaled, otherwise preserve crispyness™️

This commit is contained in:
Crystalwarrior 2020-03-12 00:47:39 +03:00
parent 9b8f60061a
commit ce3269cc36

View File

@ -241,8 +241,8 @@ QPixmap AOCharMovie::get_pixmap(QImage image)
f_pixmap = QPixmap::fromImage(image); f_pixmap = QPixmap::fromImage(image);
// auto aspect_ratio = Qt::KeepAspectRatio; // auto aspect_ratio = Qt::KeepAspectRatio;
auto transform_mode = Qt::FastTransformation; auto transform_mode = Qt::FastTransformation;
// if () if (f_pixmap.height() > f_h) //We are downscaling, use anti-aliasing.
// transform_mode = Qt::SmoothTransformation; transform_mode = Qt::SmoothTransformation;
f_pixmap = f_pixmap.scaledToHeight(f_h, transform_mode); f_pixmap = f_pixmap.scaledToHeight(f_h, transform_mode);
this->resize(f_pixmap.size()); this->resize(f_pixmap.size());