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?
精彩评论