class_atlastexture.rst 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. Member Functions
  13. ----------------
  14. +--------------------------------+--------------------------------------------------------------------------------------------------+
  15. | :ref:`Texture<class_texture>` | :ref:`get_atlas<class_AtlasTexture_get_atlas>` **(** **)** const |
  16. +--------------------------------+--------------------------------------------------------------------------------------------------+
  17. | :ref:`Rect2<class_rect2>` | :ref:`get_margin<class_AtlasTexture_get_margin>` **(** **)** const |
  18. +--------------------------------+--------------------------------------------------------------------------------------------------+
  19. | :ref:`Rect2<class_rect2>` | :ref:`get_region<class_AtlasTexture_get_region>` **(** **)** const |
  20. +--------------------------------+--------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_atlas<class_AtlasTexture_set_atlas>` **(** :ref:`Texture<class_texture>` atlas **)** |
  22. +--------------------------------+--------------------------------------------------------------------------------------------------+
  23. | void | :ref:`set_margin<class_AtlasTexture_set_margin>` **(** :ref:`Rect2<class_rect2>` margin **)** |
  24. +--------------------------------+--------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_region<class_AtlasTexture_set_region>` **(** :ref:`Rect2<class_rect2>` region **)** |
  26. +--------------------------------+--------------------------------------------------------------------------------------------------+
  27. Member Variables
  28. ----------------
  29. - :ref:`Texture<class_texture>` **atlas** - The texture that contains the atlas. Can be any [Texture] subtype.
  30. - :ref:`Rect2<class_rect2>` **margin** - The margin around the region. The [Rect2]'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin.
  31. - :ref:`Rect2<class_rect2>` **region** - The AtlasTexture's used region.
  32. Description
  33. -----------
  34. :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,
  35. and a region that defines the actual area of the AtlasTexture.
  36. Member Function Description
  37. ---------------------------
  38. .. _class_AtlasTexture_get_atlas:
  39. - :ref:`Texture<class_texture>` **get_atlas** **(** **)** const
  40. .. _class_AtlasTexture_get_margin:
  41. - :ref:`Rect2<class_rect2>` **get_margin** **(** **)** const
  42. .. _class_AtlasTexture_get_region:
  43. - :ref:`Rect2<class_rect2>` **get_region** **(** **)** const
  44. .. _class_AtlasTexture_set_atlas:
  45. - void **set_atlas** **(** :ref:`Texture<class_texture>` atlas **)**
  46. .. _class_AtlasTexture_set_margin:
  47. - void **set_margin** **(** :ref:`Rect2<class_rect2>` margin **)**
  48. .. _class_AtlasTexture_set_region:
  49. - void **set_region** **(** :ref:`Rect2<class_rect2>` region **)**