开发者

Drawing Inner Shadow with CoreGraphics

开发者 https://www.devze.com 2023-01-16 09:40 出处:网络
I know that you can use CGContextSetShadow to draw a drop shadow, but is there any w开发者_开发知识库ay to draw an inner shadow?This implies that what you\'re drawing has an interior to view the shado

I know that you can use CGContextSetShadow to draw a drop shadow, but is there any w开发者_开发知识库ay to draw an inner shadow?


This implies that what you're drawing has an interior to view the shadow through. I further presume that you don't want the shadow to appear outside what you're drawing.

So, clip to the outline of what you're drawing, and then draw with shadow as normal.

0

精彩评论

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