class_colorarray.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. .. _class_ColorArray:
  2. ColorArray
  3. ==========
  4. **Category:** Built-In Types
  5. Array of Colors
  6. Member Functions
  7. ----------------
  8. +--------------------------------------+-----------------------------------------------------------------------------------------------------------+
  9. | void | :ref:`push_back<class_ColorArray_push_back>` **(** :ref:`Color<class_color>` color **)** |
  10. +--------------------------------------+-----------------------------------------------------------------------------------------------------------+
  11. | void | :ref:`resize<class_ColorArray_resize>` **(** :ref:`int<class_int>` idx **)** |
  12. +--------------------------------------+-----------------------------------------------------------------------------------------------------------+
  13. | void | :ref:`set<class_ColorArray_set>` **(** :ref:`int<class_int>` idx, :ref:`Color<class_color>` color **)** |
  14. +--------------------------------------+-----------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`size<class_ColorArray_size>` **(** **)** |
  16. +--------------------------------------+-----------------------------------------------------------------------------------------------------------+
  17. | :ref:`ColorArray<class_colorarray>` | :ref:`ColorArray<class_ColorArray_ColorArray>` **(** :ref:`Array<class_array>` from **)** |
  18. +--------------------------------------+-----------------------------------------------------------------------------------------------------------+
  19. Description
  20. -----------
  21. Array of Color, can only contains colors. Optimized for memory usage, can't fragment the memory.
  22. Member Function Description
  23. ---------------------------
  24. .. _class_ColorArray_push_back:
  25. - void **push_back** **(** :ref:`Color<class_color>` color **)**
  26. Append a value to the array.
  27. .. _class_ColorArray_resize:
  28. - void **resize** **(** :ref:`int<class_int>` idx **)**
  29. Resize the array.
  30. .. _class_ColorArray_set:
  31. - void **set** **(** :ref:`int<class_int>` idx, :ref:`Color<class_color>` color **)**
  32. Set an index in the array.
  33. .. _class_ColorArray_size:
  34. - :ref:`int<class_int>` **size** **(** **)**
  35. Return the array size.
  36. .. _class_ColorArray_ColorArray:
  37. - :ref:`ColorArray<class_colorarray>` **ColorArray** **(** :ref:`Array<class_array>` from **)**
  38. Create from a generic array.