mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Deprecated AffineTransform::getScaleFactor() as it was producing incorrect values for transforms containing rotations. Added getDeterminant() method for getting the determinant of the transform
This commit is contained in:
parent
5315160e51
commit
26c9468dc5
7 changed files with 62 additions and 11 deletions
|
|
@ -1190,12 +1190,12 @@ private:
|
|||
{
|
||||
*rectToCheck = convertFromHostBounds (*rectToCheck);
|
||||
|
||||
auto scale = editor->getTransform().getScaleFactor();
|
||||
auto transformScale = std::sqrt (std::abs (editor->getTransform().getDeterminant()));
|
||||
|
||||
auto minW = (double) (constrainer->getMinimumWidth() * scale);
|
||||
auto maxW = (double) (constrainer->getMaximumWidth() * scale);
|
||||
auto minH = (double) (constrainer->getMinimumHeight() * scale);
|
||||
auto maxH = (double) (constrainer->getMaximumHeight() * scale);
|
||||
auto minW = (double) (constrainer->getMinimumWidth() * transformScale);
|
||||
auto maxW = (double) (constrainer->getMaximumWidth() * transformScale);
|
||||
auto minH = (double) (constrainer->getMinimumHeight() * transformScale);
|
||||
auto maxH = (double) (constrainer->getMaximumHeight() * transformScale);
|
||||
|
||||
auto width = (double) (rectToCheck->right - rectToCheck->left);
|
||||
auto height = (double) (rectToCheck->bottom - rectToCheck->top);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue