# Quartz2D和漸變線

## 最佳答案

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