简体   繁体   中英

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 to 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM