3

图像处理详解之MaskFilter

 3 years ago
source link: https://blog.csdn.net/eclipsexys/article/details/8349101
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

图像处理详解之MaskFilter

eclipse_xu 2012-12-20 11:36:48 3039
分类专栏: Android

使用MaskFilter

MaskFilter类可以为Paint分配边缘效果。

对MaskFilter的扩展可以对一个Paint边缘的alpha通道应用转换。Android包含了下面几种MaskFilter:

BlurMaskFilter   指定了一个模糊的样式和半径来处理Paint的边缘。

EmbossMaskFilter  指定了光源的方向和环境光强度来添加浮雕效果。

要应用一个MaskFilter,可以使用setMaskFilter方法,并传递给它一个MaskFilter对象。下面的例子是对一个已经存在的Paint应用一个EmbossMaskFilter:


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK