Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个使用 coregraphics 的自定义形状绘图,我还想为其添加阴影和渐变。我一直在尝试和搜索很多关于如何组合和执行此操作的信息,但我无法让它工作。我也只能画一个。任何人已经这样做或知道如何做到这一点?谢谢你。
Quartz 仅将阴影应用于填充和描边。绘制渐变不算作填充。
填充纯色(绘制阴影),然后在同一区域绘制渐变。