How to draw a color wheel in objective-c

前端 未结 6 1730
Happy的楠姐
Happy的楠姐 2020-12-07 12:32

I am trying to draw a color wheel for an iPhone, but I can\'t get the gradient to rotate around a point. I am trying to use gradients but objective-c provides a linear grad

6条回答
  •  一生所求
    2020-12-07 13:05

    I did something like this by creating a large RGBA bitmap, coloring each pixel depending on its location converted to polar coordinates, then converting the bitmap to an image and drawing the image scaled down. The scaling down was to help antialias pixelation near the center.

提交回复
热议问题