Difference between texture scale modes

Could someone clearly explain the difference between →

ScaleMode.StretchToFill

ScaleMode.ScaleAndCrop

ScaleMode.ScaleToFit

I’ve read the API but I still could not understand.

What happens when I use each one?

The trick is, think about a 1 inch square texture. How can you put it in a 2 by 3 inch area? It will never fit 100% properly, but there are a few ways you could fake it. That’s what the scaleMode options are for – tell it which way to sort of cram a texture into the wrong size. Options:

  1. leave it 1x1, with lots of blank space, 2) grow it to 2x2 with blank space on the right, 3) grow to 3x3 with the top cut off, 4) stretch it extra sideways to exactly 2x3 – it will look bad stretched out, but won’t have any blank space, 5) use six perfect 1x1 tiles.

StretchToFill - It just stretches the texture as much as it needs to to fit the rectangle passed.

ScaleAndCrop - Makes the texture fill the complete rectangle but still tries to maintain the aspect ratio, if the aspect ratio causes anything to go over the rectangle it is just cropped

ScaleToFit - Dose not seem to change the texture, no matter what I do. It just keeps the original aspect ratio.