width
and height
refer to the actual width and height whereas sourceWidth
and sourceHeight
refer to the width and height before any transformations such as when scaleX
or scaleY
are not 1.
Note: I'm aware that this response is quite after the original, but this is more for others who happen to arrive here.