Struct TextureRect

Control for drawing textures.

struct TextureRect ;

Used to draw icons and sprites in a user interface. The texture's placement can be controlled with the stretchMode property. It can scale, tile, or stay centered inside its bounding rectangle.

Properties

NameTypeDescription
expand[get, set] boolIf true, the texture scales to fit its bounding rectangle.
flipH[get, set] boolIf true, texture is flipped horizontally.
flipV[get, set] boolIf true, texture is flipped vertically.
stretchMode[get, set] TextureRect.StretchModeControls the texture's behavior when resizing the node's bounding rectangle. See stretchmode.
texture[get, set] TextureThe node's Texture resource.

Methods

NameDescription
_textureChanged
getStretchMode
getTexture
hasExpand
isFlippedH
isFlippedV
setExpand
setFlipH
setFlipV
setStretchMode
setTexture

Enums

NameDescription
Constants
StretchMode