class_imagetexture.rst 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_ImageTexture:
  4. ImageTexture
  5. ============
  6. **Inherits:** :ref:`Texture<class_texture>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Member Functions
  11. ----------------
  12. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  13. | void | :ref:`create<class_ImageTexture_create>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` format, :ref:`int<class_int>` flags=7 **)** |
  14. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`create_from_image<class_ImageTexture_create_from_image>` **(** :ref:`Image<class_image>` image, :ref:`int<class_int>` flags=7 **)** |
  16. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`get_format<class_ImageTexture_get_format>` **(** **)** const |
  18. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`load<class_ImageTexture_load>` **(** :ref:`String<class_string>` path **)** |
  20. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_data<class_ImageTexture_set_data>` **(** :ref:`Image<class_image>` image **)** |
  22. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`Image<class_image>` | :ref:`get_data<class_ImageTexture_get_data>` **(** **)** const |
  24. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_storage<class_ImageTexture_set_storage>` **(** :ref:`int<class_int>` mode **)** |
  26. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`get_storage<class_ImageTexture_get_storage>` **(** **)** const |
  28. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set_lossy_storage_quality<class_ImageTexture_set_lossy_storage_quality>` **(** :ref:`float<class_float>` quality **)** |
  30. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`float<class_float>` | :ref:`get_lossy_storage_quality<class_ImageTexture_get_lossy_storage_quality>` **(** **)** const |
  32. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`fix_alpha_edges<class_ImageTexture_fix_alpha_edges>` **(** **)** |
  34. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`premultiply_alpha<class_ImageTexture_premultiply_alpha>` **(** **)** |
  36. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`normal_to_xy<class_ImageTexture_normal_to_xy>` **(** **)** |
  38. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`shrink_x2_and_keep_size<class_ImageTexture_shrink_x2_and_keep_size>` **(** **)** |
  40. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`set_size_override<class_ImageTexture_set_size_override>` **(** :ref:`Vector2<class_vector2>` size **)** |
  42. +----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. Numeric Constants
  44. -----------------
  45. - **STORAGE_RAW** = **0**
  46. - **STORAGE_COMPRESS_LOSSY** = **1**
  47. - **STORAGE_COMPRESS_LOSSLESS** = **2**
  48. Member Function Description
  49. ---------------------------
  50. .. _class_ImageTexture_create:
  51. - void **create** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` format, :ref:`int<class_int>` flags=7 **)**
  52. .. _class_ImageTexture_create_from_image:
  53. - void **create_from_image** **(** :ref:`Image<class_image>` image, :ref:`int<class_int>` flags=7 **)**
  54. .. _class_ImageTexture_get_format:
  55. - :ref:`int<class_int>` **get_format** **(** **)** const
  56. .. _class_ImageTexture_load:
  57. - void **load** **(** :ref:`String<class_string>` path **)**
  58. .. _class_ImageTexture_set_data:
  59. - void **set_data** **(** :ref:`Image<class_image>` image **)**
  60. .. _class_ImageTexture_get_data:
  61. - :ref:`Image<class_image>` **get_data** **(** **)** const
  62. .. _class_ImageTexture_set_storage:
  63. - void **set_storage** **(** :ref:`int<class_int>` mode **)**
  64. .. _class_ImageTexture_get_storage:
  65. - :ref:`int<class_int>` **get_storage** **(** **)** const
  66. .. _class_ImageTexture_set_lossy_storage_quality:
  67. - void **set_lossy_storage_quality** **(** :ref:`float<class_float>` quality **)**
  68. .. _class_ImageTexture_get_lossy_storage_quality:
  69. - :ref:`float<class_float>` **get_lossy_storage_quality** **(** **)** const
  70. .. _class_ImageTexture_fix_alpha_edges:
  71. - void **fix_alpha_edges** **(** **)**
  72. .. _class_ImageTexture_premultiply_alpha:
  73. - void **premultiply_alpha** **(** **)**
  74. .. _class_ImageTexture_normal_to_xy:
  75. - void **normal_to_xy** **(** **)**
  76. .. _class_ImageTexture_shrink_x2_and_keep_size:
  77. - void **shrink_x2_and_keep_size** **(** **)**
  78. .. _class_ImageTexture_set_size_override:
  79. - void **set_size_override** **(** :ref:`Vector2<class_vector2>` size **)**