Files
godot-docs/classes/class_texturerect.rst
2017-04-07 22:11:07 +02:00

87 lines
3.6 KiB
ReStructuredText

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
.. _class_TextureRect:
TextureRect
===========
**Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
**Category:** Core
Brief Description
-----------------
Control Frame that draws a texture.
Member Functions
----------------
+------------------------------+--------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_stretch_mode<class_TextureRect_get_stretch_mode>` **(** **)** const |
+------------------------------+--------------------------------------------------------------------------------------------------------------+
| :ref:`Object<class_object>` | :ref:`get_texture<class_TextureRect_get_texture>` **(** **)** const |
+------------------------------+--------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_expand<class_TextureRect_has_expand>` **(** **)** const |
+------------------------------+--------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_expand<class_TextureRect_set_expand>` **(** :ref:`bool<class_bool>` enable **)** |
+------------------------------+--------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_stretch_mode<class_TextureRect_set_stretch_mode>` **(** :ref:`int<class_int>` stretch_mode **)** |
+------------------------------+--------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_texture<class_TextureRect_set_texture>` **(** :ref:`Object<class_object>` texture **)** |
+------------------------------+--------------------------------------------------------------------------------------------------------------+
Member Variables
----------------
- :ref:`bool<class_bool>` **expand**
- :ref:`int<class_int>` **stretch_mode**
- :ref:`Texture<class_texture>` **texture**
Numeric Constants
-----------------
- **STRETCH_SCALE_ON_EXPAND** = **0**
- **STRETCH_SCALE** = **1**
- **STRETCH_TILE** = **2**
- **STRETCH_KEEP** = **3**
- **STRETCH_KEEP_CENTERED** = **4**
- **STRETCH_KEEP_ASPECT** = **5**
- **STRETCH_KEEP_ASPECT_CENTERED** = **6**
- **STRETCH_KEEP_ASPECT_COVERED** = **7**
Description
-----------
Control frame that simply draws an assigned texture. It can stretch or not. It's a simple way to just show an image in a UI.
Member Function Description
---------------------------
.. _class_TextureRect_get_stretch_mode:
- :ref:`int<class_int>` **get_stretch_mode** **(** **)** const
.. _class_TextureRect_get_texture:
- :ref:`Object<class_object>` **get_texture** **(** **)** const
.. _class_TextureRect_has_expand:
- :ref:`bool<class_bool>` **has_expand** **(** **)** const
.. _class_TextureRect_set_expand:
- void **set_expand** **(** :ref:`bool<class_bool>` enable **)**
.. _class_TextureRect_set_stretch_mode:
- void **set_stretch_mode** **(** :ref:`int<class_int>` stretch_mode **)**
.. _class_TextureRect_set_texture:
- void **set_texture** **(** :ref:`Object<class_object>` texture **)**