Sets the aspect mode of this Size component.
The aspect mode controls what happens when you modify the
height properties, or call
It can be a number from 0 to 4, or a Size constant:
- NONE = Do not make the size fit the aspect ratio. Change the ratio when the size changes.
- WIDTH_CONTROLS_HEIGHT = The height is automatically adjusted based on the width.
- HEIGHT_CONTROLS_WIDTH = The width is automatically adjusted based on the height.
- FIT = The width and height are automatically adjusted to fit inside the given target area, while keeping the aspect ratio. Depending on the aspect ratio there may be some space inside the area which is not covered.
- ENVELOP = The width and height are automatically adjusted to make the size cover the entire target area while keeping the aspect ratio. This may extend further out than the target size.
Calling this method automatically recalculates the
width and the
height, if required.