Gradient.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Gradient" inherits="Resource" category="Core" version="3.1">
  3. <brief_description>
  4. Color interpolator node.
  5. </brief_description>
  6. <description>
  7. Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color 3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset 0 and the other (white) at the ramp higher offset 1.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="add_point">
  15. <return type="void">
  16. </return>
  17. <argument index="0" name="offset" type="float">
  18. </argument>
  19. <argument index="1" name="color" type="Color">
  20. </argument>
  21. <description>
  22. Adds the specified color to the end of the ramp, with the specified offset
  23. </description>
  24. </method>
  25. <method name="get_color" qualifiers="const">
  26. <return type="Color">
  27. </return>
  28. <argument index="0" name="point" type="int">
  29. </argument>
  30. <description>
  31. Returns the color of the ramp color at index [i]point[/i]
  32. </description>
  33. </method>
  34. <method name="get_offset" qualifiers="const">
  35. <return type="float">
  36. </return>
  37. <argument index="0" name="point" type="int">
  38. </argument>
  39. <description>
  40. Returns the offset of the ramp color at index [i]point[/i]
  41. </description>
  42. </method>
  43. <method name="get_point_count" qualifiers="const">
  44. <return type="int">
  45. </return>
  46. <description>
  47. Returns the number of colors in the ramp
  48. </description>
  49. </method>
  50. <method name="interpolate">
  51. <return type="Color">
  52. </return>
  53. <argument index="0" name="offset" type="float">
  54. </argument>
  55. <description>
  56. Returns the interpolated color specified by [i]offset[/i]
  57. </description>
  58. </method>
  59. <method name="remove_point">
  60. <return type="void">
  61. </return>
  62. <argument index="0" name="offset" type="int">
  63. </argument>
  64. <description>
  65. Removes the color at the index [i]offset[/i]
  66. </description>
  67. </method>
  68. <method name="set_color">
  69. <return type="void">
  70. </return>
  71. <argument index="0" name="point" type="int">
  72. </argument>
  73. <argument index="1" name="color" type="Color">
  74. </argument>
  75. <description>
  76. Sets the color of the ramp color at index [i]point[/i]
  77. </description>
  78. </method>
  79. <method name="set_offset">
  80. <return type="void">
  81. </return>
  82. <argument index="0" name="point" type="int">
  83. </argument>
  84. <argument index="1" name="offset" type="float">
  85. </argument>
  86. <description>
  87. Sets the offset for the ramp color at index [i]point[/i]
  88. </description>
  89. </method>
  90. </methods>
  91. <members>
  92. <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors">
  93. Gradient's colors returned as a [PoolColorArray].
  94. </member>
  95. <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets">
  96. Gradient's offsets returned as a [PoolRealArray].
  97. </member>
  98. </members>
  99. <constants>
  100. </constants>
  101. </class>