:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the LargeTexture.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_LargeTexture: LargeTexture ============ **Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` A :ref:`Texture2D` capable of storing many smaller textures with offsets. Description ----------- A :ref:`Texture2D` capable of storing many smaller textures with offsets. You can dynamically add pieces (:ref:`Texture2D`\ s) to this ``LargeTexture`` using different offsets. Methods ------- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`add_piece` **(** :ref:`Vector2` ofs, :ref:`Texture2D` texture **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_piece_count` **(** **)** const | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_piece_offset` **(** :ref:`int` idx **)** const | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_piece_texture` **(** :ref:`int` idx **)** const | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_piece_offset` **(** :ref:`int` idx, :ref:`Vector2` ofs **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_piece_texture` **(** :ref:`int` idx, :ref:`Texture2D` texture **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_size` **(** :ref:`Vector2` size **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- .. _class_LargeTexture_method_add_piece: - :ref:`int` **add_piece** **(** :ref:`Vector2` ofs, :ref:`Texture2D` texture **)** Adds ``texture`` to this ``LargeTexture``, starting on offset ``ofs``. ---- .. _class_LargeTexture_method_clear: - void **clear** **(** **)** Clears the ``LargeTexture``. ---- .. _class_LargeTexture_method_get_piece_count: - :ref:`int` **get_piece_count** **(** **)** const Returns the number of pieces currently in this ``LargeTexture``. ---- .. _class_LargeTexture_method_get_piece_offset: - :ref:`Vector2` **get_piece_offset** **(** :ref:`int` idx **)** const Returns the offset of the piece with the index ``idx``. ---- .. _class_LargeTexture_method_get_piece_texture: - :ref:`Texture2D` **get_piece_texture** **(** :ref:`int` idx **)** const Returns the :ref:`Texture2D` of the piece with the index ``idx``. ---- .. _class_LargeTexture_method_set_piece_offset: - void **set_piece_offset** **(** :ref:`int` idx, :ref:`Vector2` ofs **)** Sets the offset of the piece with the index ``idx`` to ``ofs``. ---- .. _class_LargeTexture_method_set_piece_texture: - void **set_piece_texture** **(** :ref:`int` idx, :ref:`Texture2D` texture **)** Sets the :ref:`Texture2D` of the piece with index ``idx`` to ``texture``. ---- .. _class_LargeTexture_method_set_size: - void **set_size** **(** :ref:`Vector2` size **)** Sets the size of this ``LargeTexture``.