iphone - Quartz 2D: draw from a CGContext to another CGContext -


मेरे पास एक CGBitmapContext ( bitmapContext ) है और मैं कुछ आयताकार भाग ( )

= यूआईजीआरएफ़िक्सगेटकूर्ंटकॉन्टेक्स (); CGImageRef cgImage = CGBitmapContextCreateImage (बिटमैपकॉन्टेक्स); CGContextClipToRect (संदर्भ, rect); CGContextDrawImage (संदर्भ, CGRectMake (0, 0, चौड़ाई, ऊंचाई), cgImage); CGImageRelease (cgImage);

क्या यह इष्टतम है? यह करने का सबसे अच्छा तरीका क्या है?

वैकल्पिक रूप से एक उप-छवि, जिसे मैं केवल कम इष्टतम होने की कल्पना कर सकता हूं।


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -