class_styleboxtexture.rst 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the StyleBoxTexture.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_StyleBoxTexture:
  5. StyleBoxTexture
  6. ===============
  7. **Inherits:** :ref:`StyleBox<class_stylebox>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Texture Based 3x3 scale style.
  12. Member Functions
  13. ----------------
  14. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`get_expand_margin_size<class_StyleBoxTexture_get_expand_margin_size>` **(** :ref:`int<class_int>` margin **)** const |
  16. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`get_h_axis_stretch_mode<class_StyleBoxTexture_get_h_axis_stretch_mode>` **(** **)** const |
  18. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`float<class_float>` | :ref:`get_margin_size<class_StyleBoxTexture_get_margin_size>` **(** :ref:`int<class_int>` margin **)** const |
  20. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`Color<class_color>` | :ref:`get_modulate<class_StyleBoxTexture_get_modulate>` **(** **)** const |
  22. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`Resource<class_resource>` | :ref:`get_normal_map<class_StyleBoxTexture_get_normal_map>` **(** **)** const |
  24. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`Rect2<class_rect2>` | :ref:`get_region_rect<class_StyleBoxTexture_get_region_rect>` **(** **)** const |
  26. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`Resource<class_resource>` | :ref:`get_texture<class_StyleBoxTexture_get_texture>` **(** **)** const |
  28. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`int<class_int>` | :ref:`get_v_axis_stretch_mode<class_StyleBoxTexture_get_v_axis_stretch_mode>` **(** **)** const |
  30. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`is_draw_center_enabled<class_StyleBoxTexture_is_draw_center_enabled>` **(** **)** const |
  32. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`set_draw_center<class_StyleBoxTexture_set_draw_center>` **(** :ref:`bool<class_bool>` enable **)** |
  34. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_expand_margin_all<class_StyleBoxTexture_set_expand_margin_all>` **(** :ref:`float<class_float>` size **)** |
  36. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`set_expand_margin_individual<class_StyleBoxTexture_set_expand_margin_individual>` **(** :ref:`float<class_float>` size_left, :ref:`float<class_float>` size_top, :ref:`float<class_float>` size_right, :ref:`float<class_float>` size_bottom **)** |
  38. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`set_expand_margin_size<class_StyleBoxTexture_set_expand_margin_size>` **(** :ref:`int<class_int>` margin, :ref:`float<class_float>` size **)** |
  40. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`set_h_axis_stretch_mode<class_StyleBoxTexture_set_h_axis_stretch_mode>` **(** :ref:`int<class_int>` mode **)** |
  42. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`set_margin_size<class_StyleBoxTexture_set_margin_size>` **(** :ref:`int<class_int>` margin, :ref:`float<class_float>` size **)** |
  44. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`set_modulate<class_StyleBoxTexture_set_modulate>` **(** :ref:`Color<class_color>` color **)** |
  46. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`set_normal_map<class_StyleBoxTexture_set_normal_map>` **(** :ref:`Resource<class_resource>` normal_map **)** |
  48. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`set_region_rect<class_StyleBoxTexture_set_region_rect>` **(** :ref:`Rect2<class_rect2>` region **)** |
  50. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`set_texture<class_StyleBoxTexture_set_texture>` **(** :ref:`Resource<class_resource>` texture **)** |
  52. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`set_v_axis_stretch_mode<class_StyleBoxTexture_set_v_axis_stretch_mode>` **(** :ref:`int<class_int>` mode **)** |
  54. +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. Signals
  56. -------
  57. - **texture_changed** **(** **)**
  58. Member Variables
  59. ----------------
  60. - :ref:`int<class_int>` **axis_stretch_horizontal**
  61. - :ref:`int<class_int>` **axis_stretch_vertical**
  62. - :ref:`bool<class_bool>` **draw_center**
  63. - :ref:`float<class_float>` **expand_margin_bottom**
  64. - :ref:`float<class_float>` **expand_margin_left**
  65. - :ref:`float<class_float>` **expand_margin_right**
  66. - :ref:`float<class_float>` **expand_margin_top**
  67. - :ref:`float<class_float>` **margin_bottom**
  68. - :ref:`float<class_float>` **margin_left**
  69. - :ref:`float<class_float>` **margin_right**
  70. - :ref:`float<class_float>` **margin_top**
  71. - :ref:`Color<class_color>` **modulate_color**
  72. - :ref:`Resource<class_resource>` **normal_map**
  73. - :ref:`Rect2<class_rect2>` **region_rect**
  74. - :ref:`Resource<class_resource>` **texture**
  75. Numeric Constants
  76. -----------------
  77. - **AXIS_STRETCH_MODE_STRETCH** = **0**
  78. - **AXIS_STRETCH_MODE_TILE** = **1**
  79. - **AXIS_STRETCH_MODE_TILE_FIT** = **2**
  80. Description
  81. -----------
  82. Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles.
  83. Member Function Description
  84. ---------------------------
  85. .. _class_StyleBoxTexture_get_expand_margin_size:
  86. - :ref:`float<class_float>` **get_expand_margin_size** **(** :ref:`int<class_int>` margin **)** const
  87. .. _class_StyleBoxTexture_get_h_axis_stretch_mode:
  88. - :ref:`int<class_int>` **get_h_axis_stretch_mode** **(** **)** const
  89. .. _class_StyleBoxTexture_get_margin_size:
  90. - :ref:`float<class_float>` **get_margin_size** **(** :ref:`int<class_int>` margin **)** const
  91. .. _class_StyleBoxTexture_get_modulate:
  92. - :ref:`Color<class_color>` **get_modulate** **(** **)** const
  93. .. _class_StyleBoxTexture_get_normal_map:
  94. - :ref:`Resource<class_resource>` **get_normal_map** **(** **)** const
  95. .. _class_StyleBoxTexture_get_region_rect:
  96. - :ref:`Rect2<class_rect2>` **get_region_rect** **(** **)** const
  97. .. _class_StyleBoxTexture_get_texture:
  98. - :ref:`Resource<class_resource>` **get_texture** **(** **)** const
  99. .. _class_StyleBoxTexture_get_v_axis_stretch_mode:
  100. - :ref:`int<class_int>` **get_v_axis_stretch_mode** **(** **)** const
  101. .. _class_StyleBoxTexture_is_draw_center_enabled:
  102. - :ref:`bool<class_bool>` **is_draw_center_enabled** **(** **)** const
  103. .. _class_StyleBoxTexture_set_draw_center:
  104. - void **set_draw_center** **(** :ref:`bool<class_bool>` enable **)**
  105. .. _class_StyleBoxTexture_set_expand_margin_all:
  106. - void **set_expand_margin_all** **(** :ref:`float<class_float>` size **)**
  107. .. _class_StyleBoxTexture_set_expand_margin_individual:
  108. - void **set_expand_margin_individual** **(** :ref:`float<class_float>` size_left, :ref:`float<class_float>` size_top, :ref:`float<class_float>` size_right, :ref:`float<class_float>` size_bottom **)**
  109. .. _class_StyleBoxTexture_set_expand_margin_size:
  110. - void **set_expand_margin_size** **(** :ref:`int<class_int>` margin, :ref:`float<class_float>` size **)**
  111. .. _class_StyleBoxTexture_set_h_axis_stretch_mode:
  112. - void **set_h_axis_stretch_mode** **(** :ref:`int<class_int>` mode **)**
  113. .. _class_StyleBoxTexture_set_margin_size:
  114. - void **set_margin_size** **(** :ref:`int<class_int>` margin, :ref:`float<class_float>` size **)**
  115. .. _class_StyleBoxTexture_set_modulate:
  116. - void **set_modulate** **(** :ref:`Color<class_color>` color **)**
  117. .. _class_StyleBoxTexture_set_normal_map:
  118. - void **set_normal_map** **(** :ref:`Resource<class_resource>` normal_map **)**
  119. .. _class_StyleBoxTexture_set_region_rect:
  120. - void **set_region_rect** **(** :ref:`Rect2<class_rect2>` region **)**
  121. .. _class_StyleBoxTexture_set_texture:
  122. - void **set_texture** **(** :ref:`Resource<class_resource>` texture **)**
  123. .. _class_StyleBoxTexture_set_v_axis_stretch_mode:
  124. - void **set_v_axis_stretch_mode** **(** :ref:`int<class_int>` mode **)**