本文整理汇总了Java中android.text.TextPaint.clearShadowLayer方法的典型用法代码示例。如果您正苦于以下问题:Java TextPaint.clearShadowLayer方法的具体用法?Java TextPaint.clearShadowLayer怎么用?Java TextPaint.clearShadowLayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.text.TextPaint
的用法示例。
在下文中一共展示了TextPaint.clearShadowLayer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPaint
import android.text.TextPaint; //导入方法依赖的package包/类
private synchronized TextPaint getPaint(BaseDanmaku danmaku, boolean quick) {
TextPaint paint;
if (quick) {
paint = this.PAINT_DUPLICATE;
paint.set(this.PAINT);
} else {
paint = this.PAINT;
}
paint.reset();
paint.setTextSize(danmaku.textSize);
applyTextScaleConfig(danmaku, paint);
if (!this.HAS_SHADOW || this.SHADOW_RADIUS <= 0.0f || danmaku.textShadowColor == 0) {
paint.clearShadowLayer();
} else {
paint.setShadowLayer(this.SHADOW_RADIUS, 0.0f, 0.0f, danmaku.textShadowColor);
}
paint.setAntiAlias(this.ANTI_ALIAS);
return paint;
}
示例2: getPaint
import android.text.TextPaint; //导入方法依赖的package包/类
private synchronized TextPaint getPaint(BaseDanmaku danmaku, boolean fromWorkerThread) {
TextPaint paint;
if (fromWorkerThread) {
paint = PAINT;
} else {
paint = PAINT_DUPLICATE;
paint.set(PAINT);
}
paint.setTextSize(danmaku.textSize);
applyTextScaleConfig(danmaku, paint);
//ignore the transparent textShadowColor
if (!HAS_SHADOW || SHADOW_RADIUS <= 0 || danmaku.textShadowColor == 0) {
paint.clearShadowLayer();
} else {
paint.setShadowLayer(SHADOW_RADIUS, 0, 0, danmaku.textShadowColor);
}
paint.setAntiAlias(ANTI_ALIAS);
return paint;
}
示例3: updateDrawState
import android.text.TextPaint; //导入方法依赖的package包/类
@Override
public void updateDrawState(TextPaint ds) {
super.updateDrawState(ds);
int colorValue = AppApplication.getAppResources().getColor(
R.color.main_color);
ds.setColor(colorValue);
ds.setUnderlineText(false);
ds.clearShadowLayer();
}
示例4: updateDrawState
import android.text.TextPaint; //导入方法依赖的package包/类
@Override
public void updateDrawState(TextPaint ds) {
super.updateDrawState(ds);
ds.setColor(textColor);
ds.setUnderlineText(false);
ds.clearShadowLayer();
}