Masking a Drawable/Bitmap on Android

后端 未结 5 1667
挽巷
挽巷 2020-12-28 17:12

I\'m currently looking for a way to use a black and white bitmap to mask the alpha channel of another bitmap or Drawable on Android. I\'m curious as to what the best way to

5条回答
  •  渐次进展
    2020-12-28 17:40

    Using the Xfermodes example in the API Demo I was able to use a PorterDuffXfermode applied to a Paint object to blend together two bitmaps on a canvas. This works exactly how I need it to.

提交回复
热议问题