class_atlastexture.rst 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the AtlasTexture.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_AtlasTexture:
  5. AtlasTexture
  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. Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
  12. Properties
  13. ----------
  14. +-------------------------------+-------------------------------------------------------------+
  15. | :ref:`Texture<class_Texture>` | :ref:`atlas<class_AtlasTexture_property_atlas>` |
  16. +-------------------------------+-------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`filter_clip<class_AtlasTexture_property_filter_clip>` |
  18. +-------------------------------+-------------------------------------------------------------+
  19. | :ref:`Rect2<class_Rect2>` | :ref:`margin<class_AtlasTexture_property_margin>` |
  20. +-------------------------------+-------------------------------------------------------------+
  21. | :ref:`Rect2<class_Rect2>` | :ref:`region<class_AtlasTexture_property_region>` |
  22. +-------------------------------+-------------------------------------------------------------+
  23. Description
  24. -----------
  25. :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,
  26. and a region that defines the actual area of the AtlasTexture.
  27. Property Descriptions
  28. ---------------------
  29. .. _class_AtlasTexture_property_atlas:
  30. - :ref:`Texture<class_Texture>` **atlas**
  31. +----------+------------------+
  32. | *Setter* | set_atlas(value) |
  33. +----------+------------------+
  34. | *Getter* | get_atlas() |
  35. +----------+------------------+
  36. The texture that contains the atlas. Can be any :ref:`Texture<class_Texture>` subtype.
  37. .. _class_AtlasTexture_property_filter_clip:
  38. - :ref:`bool<class_bool>` **filter_clip**
  39. +----------+------------------------+
  40. | *Setter* | set_filter_clip(value) |
  41. +----------+------------------------+
  42. | *Getter* | has_filter_clip() |
  43. +----------+------------------------+
  44. If ``true``, clips the area outside of the region to avoid bleeding of the surrounding texture pixels.
  45. .. _class_AtlasTexture_property_margin:
  46. - :ref:`Rect2<class_Rect2>` **margin**
  47. +----------+-------------------+
  48. | *Setter* | set_margin(value) |
  49. +----------+-------------------+
  50. | *Getter* | get_margin() |
  51. +----------+-------------------+
  52. 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.
  53. .. _class_AtlasTexture_property_region:
  54. - :ref:`Rect2<class_Rect2>` **region**
  55. +----------+-------------------+
  56. | *Setter* | set_region(value) |
  57. +----------+-------------------+
  58. | *Getter* | get_region() |
  59. +----------+-------------------+
  60. The AtlasTexture's used region.