CGBitmapContext ( bitmapContext ) があり、現在の CGContext ( context ) にその長方形部分 ( rect )を描画したいと思います。
今、私はそのようにしています:
CGContextRef context = UIGraphicsGetCurrentContext();
CGImageRef cgImage = CGBitmapContextCreateImage(bitmapContext);
CGContextClipToRect(context, rect);
CGContextDrawImage(context, CGRectMake(0, 0, width, height), cgImage);
CGImageRelease(cgImage);
最適ですか?それを行う最良の方法は何ですか?