How to set up, modify, and clear a clipping rectangle inside an iOS draw, pictures, etc. .
Is it possible to use a more complex clipping area that is a composite of a group of rectangles and boards? You can set a clipping area with arbitrary routes, not limited to rectangles.
Followers are a few ways to do this:
-
You can attract an arbitrary route and set a clipping area with it. For example:
CGContextBeginPath (reference); // Drag a route here CGContextClosePath (reference); CGContextClip (reference); // The following drawing will be deducted on the reference
If you want to use a mask image to set a clipping area, then use the CGContextClipToMask method.
See Apple's 'Quartzdmo' sample project for more uses.
Comments
Post a Comment