class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectNodeCanvasItemControl TextureRect
A control that displays a texture.
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.
Enum ExpandMode<>():Enum

EXPAND_KEEP_SIZE:null = 0
The minimum size will be equal to texture size, i.e. TextureRect can't be smaller than the texture.


EXPAND_IGNORE_SIZE:null = 1
The size of the texture won't be considered for minimum size calculation, so the TextureRect can be shrunk down past the texture size.


EXPAND_FIT_WIDTH:null = 2
The height of the texture will be ignored. Minimum width will be equal to the current height. Useful for horizontal layouts, e.g. inside HBoxContainer.


EXPAND_FIT_WIDTH_PROPORTIONAL:null = 3
Same as EXPAND_FIT_WIDTH, but keeps texture's aspect ratio.


EXPAND_FIT_HEIGHT:null = 4
The width of the texture will be ignored. Minimum height will be equal to the current width. Useful for vertical layouts, e.g. inside VBoxContainer.


EXPAND_FIT_HEIGHT_PROPORTIONAL:null = 5
Same as EXPAND_FIT_HEIGHT, but keeps texture's aspect ratio.
Enum StretchMode<>():Enum

STRETCH_SCALE:null = 0
Scale to fit the node's bounding rectangle.


STRETCH_TILE:null = 1
Tile inside the node's bounding rectangle.
Note: STRETCH_TILE mode is not supported for texture set to an AtlasTexture with non-zero [member AtlasTexture.margin].


STRETCH_KEEP:null = 2
The texture keeps its original size and stays in the bounding rectangle's top-left corner.


STRETCH_KEEP_CENTERED:null = 3
The texture keeps its original size and stays centered in the node's bounding rectangle.


STRETCH_KEEP_ASPECT:null = 4
Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio.


STRETCH_KEEP_ASPECT_CENTERED:null = 5
Scale the texture to fit the node's bounding rectangle, center it and maintain its aspect ratio.


STRETCH_KEEP_ASPECT_COVERED:null = 6
Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits.
set get int expand_mode<>():int set get
Defines how minimum size is determined based on the texture's size.

set get bool flip_h<>():bool set get
If true, texture is flipped horizontally.

set get bool flip_v<>():bool set get
If true, texture is flipped vertically.

set get int mouse_filter<>():int set get
set get int stretch_mode<>():int set get
Controls the texture's behavior when resizing the node's bounding rectangle.

set get Texture2D texture<>():Texture2D set get
The node's Texture2D resource.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...