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().
加载中,请稍侯......
精彩评论