In the following NSGradient method:
- (void)getColor:(NSColor **)color location:(CGFloat *)location atIndex:(NSInteger)index
What is index? The documentation says index of the colour I want. But I thought the point of this method is that it tells YOU the colour to use for a particular location ? I don't know the index.
I want to define a gradient (colors and locations), and given a float return the corresponding colour.
Does anyone have an example where a gradient is defined, and this method is called ?