iDevGames Forums
circular gradient Quartz2D - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: circular gradient Quartz2D (/thread-8970.html)



circular gradient Quartz2D - pj_madrid - May 17, 2011 12:24 PM

I want to shade a circle so that the colour changes depending on what angle of the circle you are at. An example would be some kind of meter that is green when you are in the safe zone and gradually changes to a red danger zone.

I have thought of just drawing straight lines from the centre of the circle to simulate this but I wonder if there is a way to do it with a gradient fill instead.