开发者

Drawing on Existing Images in android

I am trying to create an android application same as finger paint on the canvas, the only change my app has is the canvas contain a mutable image upon it, so it seems to be paint over that image. My problem is that when i draw any of the color over the image(canvas) its overlaps the image and user can't judge the portion that was painted over. Is there any solution by which i can paint the image as we apint an image with water color(i.e., with some transparencies) I want to see the image portion that was I just painted.

I had already saw this kind off application in开发者_开发问答 iPhone, so hope it may also be possible in android too...

Thanks in advance...


Maybe Paint.setAlpha() is what you're looking for. Use a Paint with alpha in the canvas draw-Methods.


Hey All, I did it... It is possible with the help of PorterDuffXfermode and Xfermode in android. I also used an extra layer, here, for saving the image...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜