Monday, June 20, 2011

Horizontal flip in CGontextRef.

If you want to do the mirror image of the CGContext, then you want to do the horizontal flip. Use following 2 lines of code:


CGAffineTransform transform = CGAffineTransformMake(-1.0, 0.0, 0.0, 1.0, widthOfScreen, 0.0);
CGContextConcatCTM(context,transform);



For vertical flip, follow this article: LINK

No comments:

Post a Comment