Add another helper similar to the one for transforms, but that only works on 2d transforms. Fixes #4501