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...
继续阅读:androiddrawing
精彩评论