mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 03:16:58 +00:00
Fix issue 374: Selection is distorted when it's moved and RotSprite is on
Don't use RotSprite until the angle or the size of the image is changed.
This commit is contained in:
parent
ebca329112
commit
37ac1444bd
@ -615,7 +615,17 @@ void PixelsMovement::drawParallelogram(raster::Image* dst, raster::Image* src,
|
||||
const gfx::Transformation::Corners& corners,
|
||||
const gfx::Point& leftTop)
|
||||
{
|
||||
switch (UIContext::instance()->settings()->selection()->getRotationAlgorithm()) {
|
||||
RotationAlgorithm rotAlgo = UIContext::instance()->settings()->selection()->getRotationAlgorithm();
|
||||
|
||||
// If the angle and the scale weren't modified, we should use the
|
||||
// fast rotation algorithm, as it's pixel-perfect match with the
|
||||
// original selection when just a translation is applied.
|
||||
if (m_currentData.angle() == 0.0 &&
|
||||
m_currentData.bounds().getSize() == src->size()) {
|
||||
rotAlgo = kFastRotationAlgorithm;
|
||||
}
|
||||
|
||||
switch (rotAlgo) {
|
||||
|
||||
case kFastRotationAlgorithm:
|
||||
image_parallelogram(dst, src,
|
||||
|
Loading…
Reference in New Issue
Block a user