— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
This is an old revision of the document!
The stretch mode is used to determine how an image is displayed within its bounding area.
Mode | Description |
---|---|
STRETCH_SCALE | The image is scaled up or down to fit the entire bounding area. Note that the size and aspect ratio of the image aren't maintained when using this mode, as it's stretched both horizontally and vertically to cover the area. |
STRETCH_TILE | The image is tiled across the entire bounding area. The image's original size is maintained when using this mode. |
STRETCH_KEEP | The image is displayed in the top left corner of the bounding area, with its original size maintained. |
STRETCH_KEEP_CENTERED | The image is displayed in the center of the bounding area, with its original size maintained. |
STRETCH_KEEP_ASPECT | The image is scaled up or down to fit the bounding area vertically, while being anchored at the top left of the bounding area and having its aspect ratio maintained. |
STRETCH_KEEP_ASPECT_CENTERED | The image is scaled up or down to fit the bounding area vertically, while also being centered horizontally within the bounding area and having its aspect ratio maintained. |
STRETCH_KEEP_ASPECT_COVERED | The image is scaled up or down (aspect ration maintained) to the extent that it completely covers the bounding area (i.e. no black bars on the sides or top/bottom). This will potentially cut some of the sides or top/bottom of the image off according to the ratio of the image, but it ensures that there are no empty/black areas. |