[aseprite] 116/134: Fix bug flipping rectangular regions on cels with pos != (0, 0)

Tobias Hansen thansen at moszumanska.debian.org
Sat Mar 14 17:10:15 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit dc7eeac2f8b793e11e30933ed504a328204b1690
Author: David Capello <davidcapello at gmail.com>
Date:   Tue Jan 27 08:00:53 2015 -0300

    Fix bug flipping rectangular regions on cels with pos != (0,0)
---
 src/app/commands/cmd_flip.cpp | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/app/commands/cmd_flip.cpp b/src/app/commands/cmd_flip.cpp
index 8b29cbd..4240358 100644
--- a/src/app/commands/cmd_flip.cpp
+++ b/src/app/commands/cmd_flip.cpp
@@ -130,14 +130,16 @@ void FlipCommand::onExecute(Context* context)
 
         // Flip the portion of image specified by "bounds" variable.
         if (!alreadyFlipped) {
-          api.setCelPosition
-            (sprite, cel,
-              (m_flipType == raster::algorithm::FlipHorizontal ?
-                sprite->width() - image->width() - cel->x():
-                cel->x()),
-              (m_flipType == raster::algorithm::FlipVertical ?
-                sprite->height() - image->height() - cel->y():
-                cel->y()));
+          if (!document->isMaskVisible()) {
+            api.setCelPosition
+              (sprite, cel,
+                (m_flipType == raster::algorithm::FlipHorizontal ?
+                  sprite->width() - image->width() - cel->x():
+                  cel->x()),
+                (m_flipType == raster::algorithm::FlipVertical ?
+                  sprite->height() - image->height() - cel->y():
+                  cel->y()));
+          }
 
           api.flipImage(image, bounds, m_flipType);
         }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list