constrainProportions property
read / write
If true, constrains the proportions of the image by scaling it down, if its proportions doesn't match the size.
mySprite.constrainProportions = true;
Implementation
bool constrainProportions = false