Enumeration Casemigueldeicaza.swiftgodot 0.45.0SwiftGodot
keepCentered
The texture keeps its original size and stays centered in the node’s bounding rectangle.
TextureRect.swift:49case keepCentered
Other cases
case scale
Scale to fit the node’s bounding rectangle.
case tile
Tile inside the node’s bounding rectangle.
case keep
The texture keeps its original size and stays in the bounding rectangle’s top-left corner.
case keepAspect
Scale the texture to fit the node’s bounding rectangle, but maintain the texture’s aspect ratio.
case keepAspectCentered
Scale the texture to fit the node’s bounding rectangle, center it and maintain its aspect ratio.
case keepAspectCovered
Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node’s limits.