reworked stageTransformation and contentRectangle