Radial gradient


#1

If you define a radial gradient with the ColourGradient class, it creates a gradient that varies as a function of the radius from the center of the circle. I’ve been trying to figure out the best way to create a radial gradient that varies instead as a function of the angle. I’m filling a path composed of pie slices and each slice should have its color vary as a function of its angular position. Does anyone know a better way to do this than filling each pie slice as its own path with its own gradient?


#2

My LayerEffects project has code to do an angular blend. It’s not quite finished but you should be able to whip it into the shape you need.


#3

Thanks for the tip. I’d been meaning to check out your layer effects project anyway…