class_largetexture.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. Member Functions
  13. ----------------
  14. +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`add_piece<class_LargeTexture_add_piece>` **(** :ref:`Vector2<class_vector2>` ofs, :ref:`Texture<class_texture>` texture **)** |
  16. +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`clear<class_LargeTexture_clear>` **(** **)** |
  18. +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`int<class_int>` | :ref:`get_piece_count<class_LargeTexture_get_piece_count>` **(** **)** const |
  20. +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`Vector2<class_vector2>` | :ref:`get_piece_offset<class_LargeTexture_get_piece_offset>` **(** :ref:`int<class_int>` idx **)** const |
  22. +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`Texture<class_texture>` | :ref:`get_piece_texture<class_LargeTexture_get_piece_texture>` **(** :ref:`int<class_int>` idx **)** const |
  24. +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_piece_offset<class_LargeTexture_set_piece_offset>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_vector2>` ofs **)** |
  26. +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`set_piece_texture<class_LargeTexture_set_piece_texture>` **(** :ref:`int<class_int>` idx, :ref:`Texture<class_texture>` texture **)** |
  28. +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set_size<class_LargeTexture_set_size>` **(** :ref:`Vector2<class_vector2>` size **)** |
  30. +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  31. Member Variables
  32. ----------------
  33. - :ref:`Array<class_array>` **_data** - Returns an :ref:`Array<class_array>` with offsets and textures data of each added piece. Schema is offsets1, texture1, offsets2, texture2, large_texture_size.
  34. ``offsets`` : :ref:`Vector2<class_vector2>` offsets of the texture piece.
  35. ``second`` : :ref:`StreamTexture<class_streamtexture>` data of the texture piece.
  36. ``last entry`` : :ref:`Vector2<class_vector2>` size of the entire large texture.
  37. Description
  38. -----------
  39. A Texture capable of storing many smaller Textures with offsets.
  40. You can dynamically add pieces(:ref:`Texture<class_texture>`) to this ``LargeTexture`` using different offsets.
  41. Member Function Description
  42. ---------------------------
  43. .. _class_LargeTexture_add_piece:
  44. - :ref:`int<class_int>` **add_piece** **(** :ref:`Vector2<class_vector2>` ofs, :ref:`Texture<class_texture>` texture **)**
  45. Add another :ref:`Texture<class_texture>` to this ``LargeTexture``, starting on offset "ofs".
  46. .. _class_LargeTexture_clear:
  47. - void **clear** **(** **)**
  48. Clears the ``LargeTexture``.
  49. .. _class_LargeTexture_get_piece_count:
  50. - :ref:`int<class_int>` **get_piece_count** **(** **)** const
  51. Returns the number of pieces currently in this ``LargeTexture``.
  52. .. _class_LargeTexture_get_piece_offset:
  53. - :ref:`Vector2<class_vector2>` **get_piece_offset** **(** :ref:`int<class_int>` idx **)** const
  54. Returns the offset of the piece with index "idx".
  55. .. _class_LargeTexture_get_piece_texture:
  56. - :ref:`Texture<class_texture>` **get_piece_texture** **(** :ref:`int<class_int>` idx **)** const
  57. Returns the :ref:`Texture<class_texture>` of the piece with index "idx".
  58. .. _class_LargeTexture_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. .. _class_LargeTexture_set_piece_texture:
  62. - void **set_piece_texture** **(** :ref:`int<class_int>` idx, :ref:`Texture<class_texture>` texture **)**
  63. Sets the :ref:`Texture<class_texture>` of the piece with index "idx" to "ofs".
  64. .. _class_LargeTexture_set_size:
  65. - void **set_size** **(** :ref:`Vector2<class_vector2>` size **)**
  66. Sets the size of this ``LargeTexture``.