0

I´m doing some testing on gradients using NSBezierPath and make some progress so far with radial gradients. see first picture. I wonder, however, if it is possible to make angle gradients as in picture 2.

Anyone done this?

Tia, Ronald

Picture 1

Picture 2

Ronald Hofmann
  • 1,390
  • 2
  • 15
  • 26

2 Answers2

0

Cocoa has no public API for angular gradients. You'll have to do it yourself by painting pixels in varying colors.

rob mayoff
  • 375,296
  • 67
  • 796
  • 848
0

Good Question! There is no Standard Feature. Try to approx by dividing the Circle into sectors which functions as clipping Polygon Then draw a linear Gradient in direction 90 degrees to the Center line of the sectors.

AlexWien
  • 28,470
  • 6
  • 53
  • 83