views:

160

answers:

1

how can i draw gradient line with quartz2d?

+1  A: 

CGContextDrawLinearGradient draws gradients. Use CGContextClipToRect (or related clipping functions) to clip to the region you want to fill with a gradient.

There's no support for stroking or filling a path with a gradient, you instead clip to the region you want to fill.

Ken