开发者

Core Graphics: Mask Image, add Overlay and Underlay

How can I mask an image, add an overlay and an underlay to the masked image with Core Graphics? (for instance: a document icon consists out of a mask png, a page curl png and a base with shadow) Can someone give me a best pr开发者_运维问答actice?


  • Draw the underlay with CGContextDrawImage().
  • Push a graphics context state with CGContextSaveGState().
  • Load the mask and add it to the context using CGContextClipToMask().
  • Draw your content.
  • Pop the graphics context with CGContextRestoreGState().
  • Draw your overlay image with CGContextDrawImage().
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜