开发者

create a circular image from a png, android

开发者 https://www.devze.com 2023-03-01 00:53 出处:网络
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

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.

0

精彩评论

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

关注公众号