开发者

Quartz2D: How to draw into a bitmap context and show result without copying

For any paint program you need to be able to dr开发者_如何学JAVAaw lines in response to user gestures.

Is there any way to subsequently draw into the same bitmap and show the result, e.g., with a UIImageView without copying the bits with every stroke?

I tried to create a bitmap context CGBitmapContextCreate and then set a UIImageView's image by CGBitmapContextCreateImage. But unfortunately, CGBitmapContextCreateImage does also make a copy. There is a hint in the documentation that it might be possible to omit the copying. But I have yet failed to make it work. Does anybody know how this is done without the performance burden of copying?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜