class_largetexture.rst 5.4 KB

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