class_largetexture.rst 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. A :ref:`Texture2D<class_Texture2D>` capable of storing many smaller textures with offsets.
  10. Description
  11. -----------
  12. A :ref:`Texture2D<class_Texture2D>` capable of storing many smaller textures with offsets.
  13. You can dynamically add pieces (:ref:`Texture2D<class_Texture2D>`\ s) to this ``LargeTexture`` using different offsets.
  14. Methods
  15. -------
  16. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`add_piece<class_LargeTexture_method_add_piece>` **(** :ref:`Vector2<class_Vector2>` ofs, :ref:`Texture2D<class_Texture2D>` texture **)** |
  18. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`clear<class_LargeTexture_method_clear>` **(** **)** |
  20. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`int<class_int>` | :ref:`get_piece_count<class_LargeTexture_method_get_piece_count>` **(** **)** const |
  22. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`Vector2<class_Vector2>` | :ref:`get_piece_offset<class_LargeTexture_method_get_piece_offset>` **(** :ref:`int<class_int>` idx **)** const |
  24. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_piece_texture<class_LargeTexture_method_get_piece_texture>` **(** :ref:`int<class_int>` idx **)** const |
  26. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`set_piece_offset<class_LargeTexture_method_set_piece_offset>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` ofs **)** |
  28. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set_piece_texture<class_LargeTexture_method_set_piece_texture>` **(** :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` texture **)** |
  30. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set_size<class_LargeTexture_method_set_size>` **(** :ref:`Vector2<class_Vector2>` size **)** |
  32. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. Method Descriptions
  34. -------------------
  35. .. _class_LargeTexture_method_add_piece:
  36. - :ref:`int<class_int>` **add_piece** **(** :ref:`Vector2<class_Vector2>` ofs, :ref:`Texture2D<class_Texture2D>` texture **)**
  37. Adds ``texture`` to this ``LargeTexture``, starting on offset ``ofs``.
  38. ----
  39. .. _class_LargeTexture_method_clear:
  40. - void **clear** **(** **)**
  41. Clears the ``LargeTexture``.
  42. ----
  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. ----
  47. .. _class_LargeTexture_method_get_piece_offset:
  48. - :ref:`Vector2<class_Vector2>` **get_piece_offset** **(** :ref:`int<class_int>` idx **)** const
  49. Returns the offset of the piece with the index ``idx``.
  50. ----
  51. .. _class_LargeTexture_method_get_piece_texture:
  52. - :ref:`Texture2D<class_Texture2D>` **get_piece_texture** **(** :ref:`int<class_int>` idx **)** const
  53. Returns the :ref:`Texture2D<class_Texture2D>` of the piece with the index ``idx``.
  54. ----
  55. .. _class_LargeTexture_method_set_piece_offset:
  56. - void **set_piece_offset** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` ofs **)**
  57. Sets the offset of the piece with the index ``idx`` to ``ofs``.
  58. ----
  59. .. _class_LargeTexture_method_set_piece_texture:
  60. - void **set_piece_texture** **(** :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` texture **)**
  61. Sets the :ref:`Texture2D<class_Texture2D>` of the piece with index ``idx`` to ``texture``.
  62. ----
  63. .. _class_LargeTexture_method_set_size:
  64. - void **set_size** **(** :ref:`Vector2<class_Vector2>` size **)**
  65. Sets the size of this ``LargeTexture``.