LargeTexture.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="LargeTexture" inherits="Texture" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. A Texture capable of storing many smaller Textures with offsets.
  5. </brief_description>
  6. <description>
  7. A Texture capable of storing many smaller Textures with offsets.
  8. You can dynamically add pieces([Texture]) to this [code]LargeTexture[/code] using different offsets.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <demos>
  13. </demos>
  14. <methods>
  15. <method name="add_piece">
  16. <return type="int">
  17. </return>
  18. <argument index="0" name="ofs" type="Vector2">
  19. </argument>
  20. <argument index="1" name="texture" type="Texture">
  21. </argument>
  22. <description>
  23. Add another [Texture] to this [code]LargeTexture[/code], starting on offset "ofs".
  24. </description>
  25. </method>
  26. <method name="clear">
  27. <return type="void">
  28. </return>
  29. <description>
  30. Clears the [code]LargeTexture[/code].
  31. </description>
  32. </method>
  33. <method name="get_piece_count" qualifiers="const">
  34. <return type="int">
  35. </return>
  36. <description>
  37. Returns the number of pieces currently in this [code]LargeTexture[/code].
  38. </description>
  39. </method>
  40. <method name="get_piece_offset" qualifiers="const">
  41. <return type="Vector2">
  42. </return>
  43. <argument index="0" name="idx" type="int">
  44. </argument>
  45. <description>
  46. Returns the offset of the piece with index "idx".
  47. </description>
  48. </method>
  49. <method name="get_piece_texture" qualifiers="const">
  50. <return type="Texture">
  51. </return>
  52. <argument index="0" name="idx" type="int">
  53. </argument>
  54. <description>
  55. Returns the [Texture] of the piece with index "idx".
  56. </description>
  57. </method>
  58. <method name="set_piece_offset">
  59. <return type="void">
  60. </return>
  61. <argument index="0" name="idx" type="int">
  62. </argument>
  63. <argument index="1" name="ofs" type="Vector2">
  64. </argument>
  65. <description>
  66. Sets the offset of the piece with index "idx" to "ofs".
  67. </description>
  68. </method>
  69. <method name="set_piece_texture">
  70. <return type="void">
  71. </return>
  72. <argument index="0" name="idx" type="int">
  73. </argument>
  74. <argument index="1" name="texture" type="Texture">
  75. </argument>
  76. <description>
  77. Sets the [Texture] of the piece with index "idx" to "ofs".
  78. </description>
  79. </method>
  80. <method name="set_size">
  81. <return type="void">
  82. </return>
  83. <argument index="0" name="size" type="Vector2">
  84. </argument>
  85. <description>
  86. Sets the size of this [code]LargeTexture[/code].
  87. </description>
  88. </method>
  89. </methods>
  90. <members>
  91. <member name="_data" type="Array" setter="_set_data" getter="_get_data">
  92. Returns an [Array] with offsets and textures data of each added piece. Schema is [offsets1, texture1, offsets2, texture2, large_texture_size].
  93. [code]offsets[/code] : [Vector2] offsets of the texture piece.
  94. [code]second[/code] : [StreamTexture] data of the texture piece.
  95. [code]last entry[/code] : [Vector2] size of the entire large texture.
  96. </member>
  97. </members>
  98. <constants>
  99. </constants>
  100. </class>