author | Yan Yan <yan.yan@amlogic.com> | 2017-12-22 10:14:42 (GMT) |
---|---|---|
committer | Yan Yan <yan.yan@amlogic.com> | 2017-12-22 10:14:42 (GMT) |
commit | a9362bd1e6ffbce4b5940486cc2095e98209184a (patch) | |
tree | 11edda54c9507a6cbcbb7f68f1d43809defe327a | |
parent | 7463a54c70708d5270f9242ffff756f0b3bf3900 (diff) | |
download | TvInput-a9362bd1e6ffbce4b5940486cc2095e98209184a.zip TvInput-a9362bd1e6ffbce4b5940486cc2095e98209184a.tar.gz TvInput-a9362bd1e6ffbce4b5940486cc2095e98209184a.tar.bz2 |
DTVCC: Fix transparent font displays like transparent block issue [1/1]
PD# NONE
Change-Id: I9ac0a73e0b69fc4108edbe3270125873126e9d24
-rw-r--r-- | DroidLogicTvInput/src/com/droidlogic/tvinput/widget/CcImplement.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/DroidLogicTvInput/src/com/droidlogic/tvinput/widget/CcImplement.java b/DroidLogicTvInput/src/com/droidlogic/tvinput/widget/CcImplement.java index e4a5d44..1386d84 100644 --- a/DroidLogicTvInput/src/com/droidlogic/tvinput/widget/CcImplement.java +++ b/DroidLogicTvInput/src/com/droidlogic/tvinput/widget/CcImplement.java @@ -1188,6 +1188,20 @@ public class CcImplement { void draw_str(Canvas canvas, String str, float left, float bottom, Paint paint) { + paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR)); + if (ccVersion.matches("cea708")) { + canvas.drawText(str, left, bottom, paint); + } else { + int i, l = str.length(); + float x = left; + + for (i = 0; i < l; i++) { + String sub = str.substring(i, i + 1); + canvas.drawText(sub, x, bottom, paint); + x += caption_screen.fixed_char_width; + } + } + paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD)); if (ccVersion.matches("cea708")) { canvas.drawText(str, left, bottom, paint); } else { |