mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-27 06:35:16 +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.
|
// Flip the portion of image specified by "bounds" variable.
|
||||||
if (!alreadyFlipped) {
|
if (!alreadyFlipped) {
|
||||||
api.setCelPosition
|
if (!document->isMaskVisible()) {
|
||||||
(sprite, cel,
|
api.setCelPosition
|
||||||
(m_flipType == raster::algorithm::FlipHorizontal ?
|
(sprite, cel,
|
||||||
sprite->width() - image->width() - cel->x():
|
(m_flipType == raster::algorithm::FlipHorizontal ?
|
||||||
cel->x()),
|
sprite->width() - image->width() - cel->x():
|
||||||
(m_flipType == raster::algorithm::FlipVertical ?
|
cel->x()),
|
||||||
sprite->height() - image->height() - cel->y():
|
(m_flipType == raster::algorithm::FlipVertical ?
|
||||||
cel->y()));
|
sprite->height() - image->height() - cel->y():
|
||||||
|
cel->y()));
|
||||||
|
}
|
||||||
|
|
||||||
api.flipImage(image, bounds, m_flipType);
|
api.flipImage(image, bounds, m_flipType);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user