1
0
Fork 0
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:
ed 2020-03-30 18:34:19 +01:00
parent 5315160e51
commit 26c9468dc5
7 changed files with 62 additions and 11 deletions

View file

@ -1024,7 +1024,8 @@ private:
float getStrokeWidth (const String& strokeWidth) const noexcept
{
return transform.getScaleFactor() * getCoordLength (strokeWidth, viewBoxW);
auto transformScale = std::sqrt (std::abs (transform.getDeterminant()));
return transformScale * getCoordLength (strokeWidth, viewBoxW);
}
PathStrokeType getStrokeFor (const XmlPath& xml) const