Files
godot-docs/classes/class_atlastexture.rst
2017-10-21 14:03:27 +02:00

87 lines
3.7 KiB
ReStructuredText

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the AtlasTexture.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_AtlasTexture:
AtlasTexture
============
**Inherits:** :ref:`Texture<class_texture>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
**Category:** Core
Brief Description
-----------------
Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
Member Functions
----------------
+--------------------------------+------------------------------------------------------------------------------------------------+
| :ref:`Texture<class_texture>` | :ref:`get_atlas<class_AtlasTexture_get_atlas>` **(** **)** const |
+--------------------------------+------------------------------------------------------------------------------------------------+
| :ref:`Rect2<class_rect2>` | :ref:`get_margin<class_AtlasTexture_get_margin>` **(** **)** const |
+--------------------------------+------------------------------------------------------------------------------------------------+
| :ref:`Rect2<class_rect2>` | :ref:`get_region<class_AtlasTexture_get_region>` **(** **)** const |
+--------------------------------+------------------------------------------------------------------------------------------------+
| void | :ref:`set_atlas<class_AtlasTexture_set_atlas>` **(** :ref:`Texture<class_texture>` atlas **)** |
+--------------------------------+------------------------------------------------------------------------------------------------+
| void | :ref:`set_margin<class_AtlasTexture_set_margin>` **(** :ref:`Rect2<class_rect2>` margin **)** |
+--------------------------------+------------------------------------------------------------------------------------------------+
| void | :ref:`set_region<class_AtlasTexture_set_region>` **(** :ref:`Rect2<class_rect2>` region **)** |
+--------------------------------+------------------------------------------------------------------------------------------------+
Member Variables
----------------
.. _class_AtlasTexture_atlas:
- :ref:`Texture<class_texture>` **atlas** - The texture that contains the atlas. Can be any :ref:`Texture<class_texture>` subtype.
.. _class_AtlasTexture_margin:
- :ref:`Rect2<class_rect2>` **margin** - The margin around the region. The :ref:`Rect2<class_rect2>`'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin.
.. _class_AtlasTexture_region:
- :ref:`Rect2<class_rect2>` **region** - The AtlasTexture's used region.
Description
-----------
:ref:`Texture<class_texture>` resource aimed at managing big textures files that pack multiple smaller textures. Consists of a :ref:`Texture<class_texture>`, a margin that defines the border width,
and a region that defines the actual area of the AtlasTexture.
Member Function Description
---------------------------
.. _class_AtlasTexture_get_atlas:
- :ref:`Texture<class_texture>` **get_atlas** **(** **)** const
.. _class_AtlasTexture_get_margin:
- :ref:`Rect2<class_rect2>` **get_margin** **(** **)** const
.. _class_AtlasTexture_get_region:
- :ref:`Rect2<class_rect2>` **get_region** **(** **)** const
.. _class_AtlasTexture_set_atlas:
- void **set_atlas** **(** :ref:`Texture<class_texture>` atlas **)**
.. _class_AtlasTexture_set_margin:
- void **set_margin** **(** :ref:`Rect2<class_rect2>` margin **)**
.. _class_AtlasTexture_set_region:
- void **set_region** **(** :ref:`Rect2<class_rect2>` region **)**