class_largetexture.rst 5.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the LargeTexture.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_LargeTexture:
  5. LargeTexture
  6. ============
  7. **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A Texture capable of storing many smaller Textures with offsets.
  12. Methods
  13. -------
  14. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`add_piece<class_LargeTexture_method_add_piece>` **(** :ref:`Vector2<class_Vector2>` ofs, :ref:`Texture<class_Texture>` texture **)** |
  16. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`clear<class_LargeTexture_method_clear>` **(** **)** |
  18. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`int<class_int>` | :ref:`get_piece_count<class_LargeTexture_method_get_piece_count>` **(** **)** const |
  20. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`Vector2<class_Vector2>` | :ref:`get_piece_offset<class_LargeTexture_method_get_piece_offset>` **(** :ref:`int<class_int>` idx **)** const |
  22. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`Texture<class_Texture>` | :ref:`get_piece_texture<class_LargeTexture_method_get_piece_texture>` **(** :ref:`int<class_int>` idx **)** const |
  24. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_piece_offset<class_LargeTexture_method_set_piece_offset>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` ofs **)** |
  26. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`set_piece_texture<class_LargeTexture_method_set_piece_texture>` **(** :ref:`int<class_int>` idx, :ref:`Texture<class_Texture>` texture **)** |
  28. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set_size<class_LargeTexture_method_set_size>` **(** :ref:`Vector2<class_Vector2>` size **)** |
  30. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  31. Description
  32. -----------
  33. A Texture capable of storing many smaller Textures with offsets.
  34. You can dynamically add pieces(:ref:`Texture<class_Texture>`) to this ``LargeTexture`` using different offsets.
  35. Method Descriptions
  36. -------------------
  37. .. _class_LargeTexture_method_add_piece:
  38. - :ref:`int<class_int>` **add_piece** **(** :ref:`Vector2<class_Vector2>` ofs, :ref:`Texture<class_Texture>` texture **)**
  39. Add another :ref:`Texture<class_Texture>` to this ``LargeTexture``, starting on offset "ofs".
  40. .. _class_LargeTexture_method_clear:
  41. - void **clear** **(** **)**
  42. Clears the ``LargeTexture``.
  43. .. _class_LargeTexture_method_get_piece_count:
  44. - :ref:`int<class_int>` **get_piece_count** **(** **)** const
  45. Returns the number of pieces currently in this ``LargeTexture``.
  46. .. _class_LargeTexture_method_get_piece_offset:
  47. - :ref:`Vector2<class_Vector2>` **get_piece_offset** **(** :ref:`int<class_int>` idx **)** const
  48. Returns the offset of the piece with index "idx".
  49. .. _class_LargeTexture_method_get_piece_texture:
  50. - :ref:`Texture<class_Texture>` **get_piece_texture** **(** :ref:`int<class_int>` idx **)** const
  51. Returns the :ref:`Texture<class_Texture>` of the piece with index "idx".
  52. .. _class_LargeTexture_method_set_piece_offset:
  53. - void **set_piece_offset** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` ofs **)**
  54. Sets the offset of the piece with index "idx" to "ofs".
  55. .. _class_LargeTexture_method_set_piece_texture:
  56. - void **set_piece_texture** **(** :ref:`int<class_int>` idx, :ref:`Texture<class_Texture>` texture **)**
  57. Sets the :ref:`Texture<class_Texture>` of the piece with index "idx" to "texture".
  58. .. _class_LargeTexture_method_set_size:
  59. - void **set_size** **(** :ref:`Vector2<class_Vector2>` size **)**
  60. Sets the size of this ``LargeTexture``.