fix: blurry when raster image scaled down
This commit is contained in:
parent
1cc5480f7d
commit
8347028871
|
@ -29,8 +29,9 @@ public:
|
||||||
if (qFuzzyCompare(scaleHint, m_cachedScaleHint)) return m_cachedPixmap;
|
if (qFuzzyCompare(scaleHint, m_cachedScaleHint)) return m_cachedPixmap;
|
||||||
QSizeF resizedScale(boundingRect().size());
|
QSizeF resizedScale(boundingRect().size());
|
||||||
resizedScale *= scaleHint;
|
resizedScale *= scaleHint;
|
||||||
m_cachedPixmap = pixmap().scaled(
|
QPixmap && sourcePixmap = pixmap();
|
||||||
resizedScale.toSize(),
|
m_cachedPixmap = sourcePixmap.scaled(
|
||||||
|
resizedScale.toSize() * sourcePixmap.devicePixelRatioF(),
|
||||||
Qt::KeepAspectRatio,
|
Qt::KeepAspectRatio,
|
||||||
Qt::SmoothTransformation);
|
Qt::SmoothTransformation);
|
||||||
m_cachedScaleHint = scaleHint;
|
m_cachedScaleHint = scaleHint;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user