public abstract class BaseDanmaku
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
protected int |
alpha
透明度
|
int |
borderColor
框的颜色,0表示无框
|
IDrawingCache<?> |
cache
绘制用缓存
|
static java.lang.String |
DANMAKU_BR_CHAR |
Duration |
duration
存活时间(毫秒)
|
int |
filterResetFlag |
int |
firstShownFlag
标记是否首次显示,首次显示后将置为FIRST_SHOWN_RESET_FLAG
|
static int |
FLAG_REQUEST_INVALIDATE |
static int |
FLAG_REQUEST_REMEASURE |
GlobalFlagValues |
flags |
boolean |
forceBuildCacheInSameThread
临时, 是否在同线程创建缓存
|
int |
index
索引/编号
|
static int |
INVISIBLE |
boolean |
isGuest
是否游客
|
boolean |
isLive
是否是直播弹幕
|
java.lang.String[] |
lines
多行文本: 如果有包含换行符需事先拆分到lines
|
int |
measureResetFlag
重置位 measure
|
int |
mFilterParam |
protected DanmakuTimer |
mTimer
计时
|
java.lang.Object |
obj
保存一些数据的引用(库内部使用, 外部使用请用tag)
|
int |
padding
内边距(像素)
|
float |
paintHeight
占位高度
|
float |
paintWidth
占位宽度
|
int |
prepareResetFlag
重置位 prepare
|
byte |
priority
弹幕优先级,0为低优先级,>0为高优先级不会被过滤器过滤
|
int |
requestFlags |
float |
rotationY
Y轴角度
|
float |
rotationZ
Z轴角度
|
int |
syncTimeOffsetResetFlag
重置位 offset time
|
java.lang.Object |
tag
可保存一些自定义数据的引用(外部使用).
|
java.lang.CharSequence |
text
文本
|
int |
textColor
文本颜色
|
int |
textShadowColor
阴影/描边颜色
|
float |
textSize
字体大小
|
long |
timeOffset
偏移时间
|
static int |
TYPE_FIX_BOTTOM |
static int |
TYPE_FIX_TOP |
static int |
TYPE_MOVEABLE_XXX |
static int |
TYPE_SCROLL_LR |
static int |
TYPE_SCROLL_RL |
static int |
TYPE_SPECIAL |
int |
underlineColor
下划线颜色,0表示无下划线
|
java.lang.String |
userHash
弹幕发布者id
|
int |
userId
弹幕发布者id, 0表示游客
|
int |
visibility
是否可见
|
static int |
VISIBLE |
构造器和说明 |
---|
BaseDanmaku() |
限定符和类型 | 方法和说明 |
---|---|
int |
draw(IDisplayer displayer) |
long |
getActualTime() |
int |
getAlpha() |
abstract float |
getBottom() |
IDrawingCache<?> |
getDrawingCache() |
long |
getDuration() |
abstract float |
getLeft() |
abstract float[] |
getRectAtTime(IDisplayer displayer,
long currTime) |
abstract float |
getRight() |
java.lang.Object |
getTag(int key) |
long |
getTime() |
DanmakuTimer |
getTimer() |
abstract float |
getTop() |
abstract int |
getType()
return the type of Danmaku
|
boolean |
hasPassedFilter() |
boolean |
isFiltered() |
boolean |
isFilteredBy(int flag) |
boolean |
isLate() |
boolean |
isMeasured() |
boolean |
isOffset() |
boolean |
isOutside() |
boolean |
isOutside(long ctime) |
boolean |
isPrepared() |
boolean |
isShown() |
boolean |
isTimeOut() |
boolean |
isTimeOut(long ctime) |
abstract void |
layout(IDisplayer displayer,
float x,
float y) |
void |
measure(IDisplayer displayer,
boolean fromWorkerThread) |
void |
prepare(IDisplayer displayer,
boolean fromWorkerThread) |
void |
setDuration(Duration duration) |
void |
setTag(int key,
java.lang.Object tag) |
void |
setTag(java.lang.Object tag) |
void |
setTime(long time) |
void |
setTimeOffset(long timeOffset) |
void |
setTimer(DanmakuTimer timer) |
void |
setVisibility(boolean b) |
public static final java.lang.String DANMAKU_BR_CHAR
public static final int TYPE_SCROLL_RL
public static final int TYPE_SCROLL_LR
public static final int TYPE_FIX_TOP
public static final int TYPE_FIX_BOTTOM
public static final int TYPE_SPECIAL
public static final int TYPE_MOVEABLE_XXX
public static final int INVISIBLE
public static final int VISIBLE
public static final int FLAG_REQUEST_REMEASURE
public static final int FLAG_REQUEST_INVALIDATE
public long timeOffset
public java.lang.CharSequence text
public java.lang.String[] lines
public java.lang.Object obj
public java.lang.Object tag
public int textColor
public float rotationZ
public float rotationY
public int textShadowColor
public int underlineColor
public float textSize
public int borderColor
public int padding
public byte priority
public float paintWidth
public float paintHeight
public Duration duration
public int index
public int visibility
public int measureResetFlag
public int syncTimeOffsetResetFlag
public int prepareResetFlag
public IDrawingCache<?> cache
public boolean isLive
public boolean forceBuildCacheInSameThread
public int userId
public java.lang.String userHash
public boolean isGuest
protected DanmakuTimer mTimer
protected int alpha
public int mFilterParam
public int filterResetFlag
public GlobalFlagValues flags
public int requestFlags
public int firstShownFlag
public long getDuration()
public void setDuration(Duration duration)
public int draw(IDisplayer displayer)
public boolean isMeasured()
public void measure(IDisplayer displayer, boolean fromWorkerThread)
public boolean isPrepared()
public void prepare(IDisplayer displayer, boolean fromWorkerThread)
public IDrawingCache<?> getDrawingCache()
public boolean isShown()
public boolean isTimeOut()
public boolean isTimeOut(long ctime)
public boolean isOutside()
public boolean isOutside(long ctime)
public boolean isLate()
public boolean hasPassedFilter()
public boolean isFiltered()
public boolean isFilteredBy(int flag)
public void setVisibility(boolean b)
public abstract void layout(IDisplayer displayer, float x, float y)
public abstract float[] getRectAtTime(IDisplayer displayer, long currTime)
public abstract float getLeft()
public abstract float getTop()
public abstract float getRight()
public abstract float getBottom()
public abstract int getType()
public DanmakuTimer getTimer()
public void setTimer(DanmakuTimer timer)
public int getAlpha()
public void setTag(java.lang.Object tag)
public void setTag(int key, java.lang.Object tag)
public java.lang.Object getTag(int key)
public void setTimeOffset(long timeOffset)
public void setTime(long time)
public long getTime()
public long getActualTime()
public boolean isOffset()