TextureRect

Control for drawing textures.

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. Note: You should enable flipV when using a TextureRect to display a ViewportTexture. Alternatively, you can enable Viewport.renderTargetVFlip on the Viewport. Otherwise, the image will appear upside down.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
StretchMode
enum StretchMode

Functions

_textureChanged
void _textureChanged()
getStretchMode
TextureRect.StretchMode getStretchMode()
getTexture
Ref!Texture getTexture()
hasExpand
bool hasExpand()
isFlippedH
bool isFlippedH()
isFlippedV
bool isFlippedV()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(TextureRect other)
opEquals
bool opEquals(typeof(null) n)
setExpand
void setExpand(bool enable)
setFlipH
void setFlipH(bool enable)
setFlipV
void setFlipV(bool enable)
setStretchMode
void setStretchMode(long stretch_mode)
setTexture
void setTexture(Texture texture)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

expand
bool expand [@property getter]
bool expand [@property setter]

If true, the texture scales to fit its bounding rectangle.

flipH
bool flipH [@property getter]
bool flipH [@property setter]

If true, texture is flipped horizontally.

flipV
bool flipV [@property getter]
bool flipV [@property setter]

If true, texture is flipped vertically.

stretchMode
TextureRect.StretchMode stretchMode [@property getter]
long stretchMode [@property setter]

Controls the texture's behavior when resizing the node's bounding rectangle. See stretchmode.

texture
Texture texture [@property getter]
Texture texture [@property setter]

The node's Texture resource.

Static functions

_new
TextureRect _new()

Construct a new instance of TextureRect. Note: use memnew!TextureRect instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta