1

I have logo text drawn as shapes (closed CGBezierPaths) that I want to fill with a gradient.(Light at the top, moving to dark at the bottom) How can I fill each shape with gradient such that the gradient is the same color for each shape.

The problem is drawing the gradient for each shape, if the letters are different height then the gradient has a different ramp since the distance is smaller. Hope that makes sense.

So basically I want draw a single gradient down the rect and use all the shapes as a clipping mask. Is this possible?

4

1 回答 1

0

对于渐变绘图 - 看看这个项目:

https://github.com/wczekalski/CDpieMenu

它以编程方式使用两种颜色创建渐变。

于 2012-10-17T08:06:51.637 回答