From d8b829a91f31241ad560ecf9694cfca1d7ecb91d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Capello?= Date: Thu, 3 Jun 2021 10:35:13 -0300 Subject: [PATCH] Fix the pixel perfect behavior when cel origin has negative x or/and y coordinates (#2748) --- src/app/ui/editor/tool_loop_impl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/ui/editor/tool_loop_impl.cpp b/src/app/ui/editor/tool_loop_impl.cpp index 4a2a5dbc1..6a794c3ee 100644 --- a/src/app/ui/editor/tool_loop_impl.cpp +++ b/src/app/ui/editor/tool_loop_impl.cpp @@ -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});