User Tools

Site Tools


stretch_mode

Stretch Mode


The stretch mode is used to determine how an image is displayed within its bounding area. This setting is used in various places throughout RPG in a Box, e.g. the Display Image scripting function, image elements in widgets, and the loading screen image set in the Game Configuration dialog or Map Properties tab.

ModeDescription
STRETCH_SCALEThe 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_TILEThe image is tiled across the entire bounding area. The image's original size is maintained when using this mode.
STRETCH_KEEPThe image is displayed in the top left corner of the bounding area, with its original size maintained.
STRETCH_KEEP_CENTEREDThe image is displayed in the center of the bounding area, with its original size maintained.
STRETCH_KEEP_ASPECTThe 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_CENTEREDThe 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_COVEREDThe image is scaled up or down (aspect ration maintained) to the extent that it completely covers the bounding area (i.e. no transparent/black bars along the sides or top/bottom). This will potentially cut off some of the sides or top/bottom of the image according its aspect ratio, but it ensures that the bounding area is covered entirely by the image.
stretch_mode.txt · Last modified: 2024/02/18 11:57 by justin