开发者

Save Canvas Drawing on Image in Android

I'm working on an applicati开发者_如何学Goon in which I'v a custom ImageView. Using custom imageview I can drag,zoom, and paste text over over it (using its onDraw() function). Now at the end I want to put all the canvas drawing over image and want to save it in the file system. I have tried imageView.getDrawingCache() method but it does not fulfill my requirements as when I zoom out the it captures black sides of the image too. Any suggestions?


  1. Create or load your Bitmap.
  2. Create Canvas.
  3. Set the Bitmap as target for this canvas. link
  4. Draw your text using the canvas.

Now your image stored in Bitmap has drawn stuff on top of it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜