create a circular image from a png, android
Given an image file (png) I would like to specify the coordinates within the image for the center of a circle and the radius and have the routine cut out that circle and display the new image. I have looked at ShapeDrawable but that only seems to do a single color using a Paint attribute. The other drawing classes also seem 开发者_如何学JAVAto use Paint but I can't figure out how to use an image for the background of a drawn cirle. thanks much
Take a look at xferModes. I think there are some good examples in the api-demos.
精彩评论