title: CAGradientLayer with Angle
body: <p>I am drawing <code>CGPath</code> which is not rectangle or square,and adding <code>CGPath</code> to <code>CAShapeLayer</code>. This <code>CAShapeLayer</code>'s frame getting from <code>CGPath</code> using <code>CGPathGetBoundingBox(path)</code>. So it will be rectangle or square. Now i want to set gradient color to layer but my path is not rectangle or square so it is not spreading gradient color equally in whole <code>CGPath</code>. Is there any way to set gradient color to CGPath or how can i set gradient color with angle? </p>
  
  <p>Please refer screen shot to understand situation. Here white color indicates frame of <code>CGPath</code> and green colour, that is our drawn <code>CGPath</code>. At the bottom of <code>CGPath</code> you can see white gradient colour which is not distributed equally in <code>CGPath</code>.</p>
  
  <p><img src="https://i.stack.imgur.com/jXmVm.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/Ah6H0.png" alt="enter image description here"></p>