喜我使用這個代碼採取截圖
+(CCRenderTexture *)screenshotWithStartNode:(CCSprite )的StartNode文件名:(的NSString)文件名 { [CCDirector sharedDirector] .nextDeltaTimeZero = YES;
CGSize winSize = CGSizeMake(startNode.contentSizeInPixels.width, startNode.contentSizeInPixels.height);
CGSize photoSize =CGSizeMake(startNode.contentSize.width, winSize.height * startNode.scaleX);
CCRenderTexture* rtx =[CCRenderTexture renderTextureWithWidth:startNode.contentSizeInPixels.width height:startNode.contentSizeInPixels.height];
[rtx begin];
[startNode visit]; [rtx end];
// save as file as PNG
[rtx saveBuffer:[self screenshotPathForFile:filename]
format:kCCImageFormatPNG];
return rtx;
}
你應該爲你提供使用,使截圖的代碼,這個問題是存在的...... – sergio