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?
- Create or load your Bitmap.
- Create Canvas.
- Set the Bitmap as target for this canvas. link
- Draw your text using the canvas.
Now your image stored in Bitmap has drawn stuff on top of it.
精彩评论