Java Code Examples for android.text.TextPaint.clearShadowLayer()

The following are Jave code examples for showing how to use clearShadowLayer() of the android.text.TextPaint class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: letv   File: AndroidDisplayer.java   Source Code and License Vote up 6 votes
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;
}
 
Example 2
Project: live_master   File: AndroidDisplayer.java   Source Code and License Vote up 6 votes
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;
}
 
Example 3
Project: MyFire   File: NameClickable.java   Source Code and License Vote up 5 votes
@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();
}
 
Example 4
Project: Hitalk   File: SpannableClickable.java   Source Code and License Vote up 5 votes
@Override
public void updateDrawState(TextPaint ds) {
    super.updateDrawState(ds);

    ds.setColor(textColor);
    ds.setUnderlineText(false);
    ds.clearShadowLayer();
}