class_atlastexture.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 AtlasTexture.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_AtlasTexture:
  6. AtlasTexture
  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. Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
  13. Properties
  14. ----------
  15. +-------------------------------+-------------------------------------------------------------+---------------------+
  16. | :ref:`Texture<class_Texture>` | :ref:`atlas<class_AtlasTexture_property_atlas>` | |
  17. +-------------------------------+-------------------------------------------------------------+---------------------+
  18. | :ref:`bool<class_bool>` | :ref:`filter_clip<class_AtlasTexture_property_filter_clip>` | false |
  19. +-------------------------------+-------------------------------------------------------------+---------------------+
  20. | :ref:`int<class_int>` | flags | **O:** 0 |
  21. +-------------------------------+-------------------------------------------------------------+---------------------+
  22. | :ref:`Rect2<class_Rect2>` | :ref:`margin<class_AtlasTexture_property_margin>` | Rect2( 0, 0, 0, 0 ) |
  23. +-------------------------------+-------------------------------------------------------------+---------------------+
  24. | :ref:`Rect2<class_Rect2>` | :ref:`region<class_AtlasTexture_property_region>` | Rect2( 0, 0, 0, 0 ) |
  25. +-------------------------------+-------------------------------------------------------------+---------------------+
  26. Description
  27. -----------
  28. :ref:`Texture<class_Texture>` resource aimed at managing big textures files that pack multiple smaller textures. Consists of a :ref:`Texture<class_Texture>`, a margin that defines the border width, and a region that defines the actual area of the AtlasTexture.
  29. Property Descriptions
  30. ---------------------
  31. .. _class_AtlasTexture_property_atlas:
  32. - :ref:`Texture<class_Texture>` **atlas**
  33. +----------+------------------+
  34. | *Setter* | set_atlas(value) |
  35. +----------+------------------+
  36. | *Getter* | get_atlas() |
  37. +----------+------------------+
  38. The texture that contains the atlas. Can be any :ref:`Texture<class_Texture>` subtype.
  39. ----
  40. .. _class_AtlasTexture_property_filter_clip:
  41. - :ref:`bool<class_bool>` **filter_clip**
  42. +-----------+------------------------+
  43. | *Default* | false |
  44. +-----------+------------------------+
  45. | *Setter* | set_filter_clip(value) |
  46. +-----------+------------------------+
  47. | *Getter* | has_filter_clip() |
  48. +-----------+------------------------+
  49. If ``true``, clips the area outside of the region to avoid bleeding of the surrounding texture pixels.
  50. ----
  51. .. _class_AtlasTexture_property_margin:
  52. - :ref:`Rect2<class_Rect2>` **margin**
  53. +-----------+---------------------+
  54. | *Default* | Rect2( 0, 0, 0, 0 ) |
  55. +-----------+---------------------+
  56. | *Setter* | set_margin(value) |
  57. +-----------+---------------------+
  58. | *Getter* | get_margin() |
  59. +-----------+---------------------+
  60. The margin around the region. The :ref:`Rect2<class_Rect2>`'s :ref:`Rect2.size<class_Rect2_property_size>` parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin.
  61. ----
  62. .. _class_AtlasTexture_property_region:
  63. - :ref:`Rect2<class_Rect2>` **region**
  64. +-----------+---------------------+
  65. | *Default* | Rect2( 0, 0, 0, 0 ) |
  66. +-----------+---------------------+
  67. | *Setter* | set_region(value) |
  68. +-----------+---------------------+
  69. | *Getter* | get_region() |
  70. +-----------+---------------------+
  71. The AtlasTexture's used region.