我只想截取图层的中间部分(它是图像),而没有位于屏幕上下部分的菜单。是否可以将图层的一部分截取到图像中?
//normal screenshots
-(UIImage *) screenshotWithNode:(CCNode*)node
{
[CCDirector sharedDirector].nextDeltaTimeZero = YES;
CGSize winSize = [CCDirector sharedDirector].winSize;
CCRenderTexture* rtx = [CCRenderTexture renderTextureWithWidth:winSize.width
height:winSize.height];
[rtx begin];
[node visit];
[rtx end];
return [rtx getUIImage];
}