本文整理匯總了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();
}