mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-26 03:35:23 +00:00
Fix bug flipping rectangular regions on cels with pos != (0,0)
This commit is contained in:
parent
e6dc8e47b9
commit
dc7eeac2f8
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user