Get Data Member Function

Returns a pointer to the <Color> object at the specified index.

Prototype

Color Get( int32 p_nIndex )

Parameters

Parameter Type Parameter Name Documentation
int32p_nIndexThe index of the <Color> object to retrieve.

Examples

Copy Text To Clipboard

import library "app_service_console_util.ssl";
import library "type_color_array_util.ssl";

auto Color red = new Color( 255, 0, 0, 255 );

auto ColorArray data;
data.Count = 4;
data.Fill( red );

Color member = data.Get( 2 );
member.SetRGBA( 255, 128, 64, 255 );

LibColorArray.Out( data );

Results

// Color is packed in BGRA order interally, so these results are correct.
COLORARRAY OUTPUT generated by TYPE_COLOR_ARRAY_UTIL.SSL
0,
0,
255,
255,
0,
0,
255,
255,
64,
128,
255,
255,
0,
0,
255,
255