use of android.graphics.MaskFilter in project AndroidStudy by tinggengyan.
the class HandWritingView method getMaskFilter.
/**
* 功能:设置画笔风格
*/
private MaskFilter getMaskFilter(int mPaintType) {
MaskFilter maskFilter = null;
switch(mPaintType) {
case // 铅笔模糊风格
BLUR:
maskFilter = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL);
break;
case // 毛笔浮雕风格
EMBOSS:
maskFilter = new EmbossMaskFilter(new float[] { 1, 1, 1 }, 0.4f, 6, 3.5f);
break;
case // 透明水彩风格
TS_PEN:
maskFilter = null;
paint.setAlpha(50);
break;
default:
maskFilter = null;
break;
}
paint.setMaskFilter(maskFilter);
return maskFilter;
}
use of android.graphics.MaskFilter in project assertj-android by square.
the class AbstractPaintAssert method hasMaskFilter.
public S hasMaskFilter(MaskFilter filter) {
isNotNull();
MaskFilter actualFilter = actual.getMaskFilter();
//
assertThat(actualFilter).overridingErrorMessage("Expected mask filter <%s> but was <%s>.", filter, //
actualFilter).isSameAs(filter);
return myself;
}
Aggregations