Fix the pixel perfect behavior when cel origin has negative x or/and y coordinates (#2748)

This commit is contained in:
Martín Capello 2021-06-03 10:35:13 -03:00 committed by David Capello
parent 687156a9ca
commit d8b829a91f

View File

@ -774,6 +774,7 @@ public:
m_tiledModeHelper.collapseRegionByTiledMode(rgn);
for (auto a : rgn) {
a.offset(-m_celOrigin);
ImageRef i(Image::create(getDstImage()->pixelFormat(), a.w, a.h));
i->copy(getDstImage(), gfx::Clip(0, 0, a));
m_savedAreas.push_back(SavedArea{ i, pt, a});