From 19b18d2a63b3e807a3200e79f76876864d2877ab Mon Sep 17 00:00:00 2001 From: Gaspar Capello Date: Mon, 8 Aug 2022 15:39:27 -0300 Subject: [PATCH] Fix reference layer scaled incorrectly after Sprite > Sprite Size (fix #3461) --- src/app/util/resize_image.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/util/resize_image.cpp b/src/app/util/resize_image.cpp index 3c78f714c..a2080ad20 100644 --- a/src/app/util/resize_image.cpp +++ b/src/app/util/resize_image.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (c) 2019-2020 Igara Studio S.A. +// Copyright (c) 2019-2022 Igara Studio S.A. // // This program is distributed under the terms of // the End-User License Agreement for Aseprite. @@ -64,9 +64,9 @@ void resize_cel_image( // Resize the cel bounds only if it's from a reference layer if (cel->layer()->isReference()) { gfx::RectF newBounds = cel->boundsF(); - newBounds.offset(-pivot); - newBounds *= scale; - newBounds.offset(pivot); + newBounds.offset(pivot - gfx::PointF(scale.w*pivot.x, scale.h*pivot.y)); + newBounds.w *= scale.w; + newBounds.h *= scale.h; tx(new cmd::SetCelBoundsF(cel, newBounds)); } else {