Fix skew transformation from north/south handles when the bounds are flipped

This commit is contained in:
David Capello 2020-09-24 16:32:43 -03:00
parent fe85d9d492
commit d843866746

View File

@ -558,8 +558,8 @@ void PixelsMovement::moveImage(const gfx::PointF& pos, MoveModifier moveModifier
gfx::PointF pivotPoint = m_currentData.pivot();
// Pivot in [0.0, 1.0] range
gfx::PointF pivot((pivotPoint.x - bounds.x) / bounds.w,
(pivotPoint.y - bounds.y) / bounds.h);
gfx::PointF pivot((pivotPoint.x - bounds.x) / ABS(bounds.w),
(pivotPoint.y - bounds.y) / ABS(bounds.h));
// Vector from AB (or CD), and AC (or BD)
vec2 u = to_vec2(B - A);