Class TextureRect
A control that displays a texture.
- Inheritance
-
TextureRect
Remarks
A control that displays a texture, for example an icon inside a GUI. The texture's placement can be controlled with the stretch_mode property. It can scale, tile, or stay centered inside its bounding rectangle.
See Also
Properties
expand_mode
Defines how minimum size is determined based on the texture's size. See ExpandMode for options.
var expand_mode : int = 0
Property Value
Remarks
flip_h
If true
, texture is flipped horizontally.
var flip_h : bool = false
Property Value
Remarks
flip_v
If true
, texture is flipped vertically.
var flip_v : bool = false
Property Value
Remarks
stretch_mode
Controls the texture's behavior when resizing the node's bounding rectangle. See StretchMode.
var stretch_mode : int = 0
Property Value
Remarks
texture
The node's Texture2D resource.
var texture : Texture2D