30 if (locations === undefined || locations === NULL)
32 var num_of_colors = components.length / 4,
35 for (var idx = 0; idx < num_of_colors; idx++)
36 locations.push( idx / (num_of_colors - 1) );
39 if (count === undefined || count === NULL)
40 count = locations.length;
46 var offset = count * 4;
47 colors[count] =
CGColorCreate(aColorSpace, components.slice(offset, offset + 4));
55 return { colorspace:aColorSpace, colors:colors, locations:locations };