1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Direct2D: Fix jitter when drawing bitmaps with non-unity scaling

Reverts ca3abbb96d.

Prior to this fix gradually changing the Component scale would lead to
the jittery movement of drawn bitmaps, as their position would be
snapped to an arbitrary integral representation.
This commit is contained in:
attila 2025-07-15 17:53:25 +02:00 committed by Attila Szarvas
parent 5bc44c301f
commit 3f898f6fee

View file

@ -924,7 +924,7 @@ void Direct2DGraphicsContext::drawImage (const Image& imageIn, const AffineTrans
continue;
const auto src = intersection - pageBounds.getPosition().toFloat();
const auto dst = getRect (intersection - pagesAndArea.area.getPosition().toFloat()).toNearestInt().toFloat();
const auto dst = getRect (intersection - pagesAndArea.area.getPosition().toFloat());
const auto [srcConverted, dstConverted] = std::tuple (D2DUtilities::toRECT_F (src),
D2DUtilities::toRECT_F (dst));