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