I am trying to give a general answer for all kinds of CGAffineTransforms, even with rotated ones.
Assuming your CGAffineTransform contains (optional)
and
then theres a general formula that gives you a scale factor:
CGAffineTransform transform = ...; CGFloat scaleFactor = sqrt(fabs(transform.a * transform.d - transform.b * transform.c));
Mirroring or flipping coordinates will be ignored, which means that (x → -x; y → y) will result in scaleFactor == 1 instead of -1.
Martin Stämmler
source share