class_atlastexture.rst 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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>` |
  19. +-------------------------------+-------------------------------------------------------------+
  20. | :ref:`Rect2<class_Rect2>` | :ref:`margin<class_AtlasTexture_property_margin>` |
  21. +-------------------------------+-------------------------------------------------------------+
  22. | :ref:`Rect2<class_Rect2>` | :ref:`region<class_AtlasTexture_property_region>` |
  23. +-------------------------------+-------------------------------------------------------------+
  24. Description
  25. -----------
  26. :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,
  27. and a region that defines the actual area of the AtlasTexture.
  28. Property Descriptions
  29. ---------------------
  30. .. _class_AtlasTexture_property_atlas:
  31. - :ref:`Texture<class_Texture>` **atlas**
  32. +----------+------------------+
  33. | *Setter* | set_atlas(value) |
  34. +----------+------------------+
  35. | *Getter* | get_atlas() |
  36. +----------+------------------+
  37. The texture that contains the atlas. Can be any :ref:`Texture<class_Texture>` subtype.
  38. ----
  39. .. _class_AtlasTexture_property_filter_clip:
  40. - :ref:`bool<class_bool>` **filter_clip**
  41. +----------+------------------------+
  42. | *Setter* | set_filter_clip(value) |
  43. +----------+------------------------+
  44. | *Getter* | has_filter_clip() |
  45. +----------+------------------------+
  46. If ``true``, clips the area outside of the region to avoid bleeding of the surrounding texture pixels.
  47. ----
  48. .. _class_AtlasTexture_property_margin:
  49. - :ref:`Rect2<class_Rect2>` **margin**
  50. +----------+-------------------+
  51. | *Setter* | set_margin(value) |
  52. +----------+-------------------+
  53. | *Getter* | get_margin() |
  54. +----------+-------------------+
  55. The margin around the region. The :ref:`Rect2<class_Rect2>`'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin.
  56. ----
  57. .. _class_AtlasTexture_property_region:
  58. - :ref:`Rect2<class_Rect2>` **region**
  59. +----------+-------------------+
  60. | *Setter* | set_region(value) |
  61. +----------+-------------------+
  62. | *Getter* | get_region() |
  63. +----------+-------------------+
  64. The AtlasTexture's used region.