.m檔程式碼如下
UIGraphicsBeginImageContext(CGRectMake(mainImageStartX, mainImageStartY, Main_Pic_Width, Main_Pic_Height).size); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextConcatCTM(context, CGAffineTransformMakeTranslation(-mainImageStartX, -mainImageStartY)); [self.view.layer renderInContext:context]; g_StartImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();
沒有留言:
張貼留言