Fix for AffineTransform::getScaleFactor() for handling negative scaling.