开发者

How to draw a drop shadow AND gradient with quartz2d?

开发者 https://www.devze.com 2022-12-25 21:48 出处:网络
I\'ve a custom shape drawing using coregraphics and i want to add a drop shadow and a gradient to it also. I\'ve been trying and searching a lot of informations on how to combine and do this, but i ca

I've a custom shape drawing using coregraphics and i want to add a drop shadow and a gradient to it also. I've been trying and searching a lot of informations on how to combine and do this, but i can't get it to work. I'm able to draw only one e开发者_StackOverflow中文版ither. Anyone doing this already or know how to do this? Thank you.


Quartz only applies shadows to fills and strokes. Drawing a gradient does not count as a fill.

Fill with a solid color (to draw the shadow), then draw the gradient in the same area.

0

精彩评论

暂无评论...
验证码 换一张
取 消