Category: Built-In Types
Array of Colors
Array of Color, can only contains colors. Optimized for memory usage, can't fragment the memory.
- :ref:`ColorArray<class_colorarray>` ColorArray ( :ref:`Array<class_array>` from )
Create from a generic array.
- void append ( :ref:`Color<class_color>` color )
Append an element at the end of the array (alias of :ref:`push_back<class_ColorArray_push_back>`).
- void append_array ( :ref:`ColorArray<class_colorarray>` array )
Append an :ref:`ColorArray<class_colorarray>` at the end of this array.
- :ref:`int<class_int>` insert ( :ref:`int<class_int>` idx, :ref:`Color<class_color>` color )
Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()).
- void invert ( )
Reverse the order of the elements in the array (so first element will now be the last).
- void push_back ( :ref:`Color<class_color>` color )
Append a value to the array.
- void remove ( :ref:`int<class_int>` idx )
Remove an element from the array by index.
- void resize ( :ref:`int<class_int>` idx )
Set the size of the :ref:`ColorArray<class_colorarray>`. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
- void set ( :ref:`int<class_int>` idx, :ref:`Color<class_color>` color )
Change the :ref:`Color<class_color>` at the given index.
- :ref:`int<class_int>` size ( )
Return the array size.