Quartz 2D: draw from a CGContext to another CGContext
- by alexey
I have a CGBitmapContext (bitmapContext) and I would like to draw some rectangle part (rect) of it to the current CGContext (context).
Right now I do that way:
CGContextRef context = UIGraphicsGetCurrentContext();
CGImageRef cgImage = CGBitmapContextCreateImage(bitmapContext);
CGContextClipToRect(context, rect);
CGContextDrawImage(context,…