开发者

clearing screen after CGContextDrawImage

I am trying for a image relaterd i-phone application.I am using a line of code

    CGContextDrawImage(context1, CGRectMake(0, 0, width, height), imageRef);

I am working with multiple images.So i want to clear the screen after this .Any bui开发者_开发知识库lt in function using for this (Like in C we can use cleardevice in graphics).Any help appreciating.


Check out CGContextFillRect - just set the rect to be the whole view and the brush to be solid white :)


For example, to clear the image you just drew with white :

const CGFloat white[] = {1.0f, 1.0f, 1.0f, 1.0f};
CGContextSetFillColor(context1, white);
CGContextFillRect(context1, CGRectMake(0, 0, width, hight));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜