public class CaptionTrack extends PhotoPasterTrack
PasterTrack.Type
Modifier and Type | Field and Description |
---|---|
float |
mScale
字幕缩放值
|
mNodeKey
Constructor and Description |
---|
CaptionTrack() |
Modifier and Type | Method and Description |
---|---|
static CaptionTrack |
fromCaption(AliyunCaption aCaption) |
int |
getBackgroundColor()
获取背景颜色
v3.24.0 新增
|
float |
getBackgroundCornerRadius()
获取背景的圆角
v3.31.0 新增
|
Source |
getFont()
获取字体资源
|
Source |
getFontEffectSource()
获取花字资源
|
float |
getFontSize()
获取字体大小
|
int |
getOutlineColor()
获取描边颜色
|
float |
getOutlineWidth()
获取描边宽度,单位:像素
|
float |
getScale()
获取字幕缩放值
|
int |
getShadowColor()
设置阴影颜色
|
float |
getShadowOffsetX()
获取阴影X轴偏移值
|
float |
getShadowOffsetY()
获取阴影Y轴偏移值
|
java.lang.String |
getText()
获取文字内容
|
int |
getTextAlignment()
获取文字对齐方式
v3.24.0 新增
|
int |
getTextColor()
获取字体颜色
|
int |
getTypeface()
获取字体样式
|
void |
setBackgroundColor(int aBackgroundColor)
设置背景颜色
v3.24.0 新增
|
void |
setBackgroundCornerRadius(float backgroundCornerRadius)
设置背景的圆角
v3.31.0 新增
|
void |
setCaption(AliyunCaption caption) |
void |
setFont(Source font)
设置字体资源
|
void |
setFontEffectSource(Source fontEffectSource)
设置花字资源
|
void |
setFontSize(float fontSize)
设置字体大小
|
void |
setOutlineColor(int outlineColor)
设置描边颜色
|
void |
setOutlineWidth(float outlineWidth)
设置描边宽度,单位:像素
|
void |
setScale(float scale)
设置字幕缩放值
|
void |
setShadowColor(int shadowColor)
获取阴影颜色
|
void |
setShadowOffsetX(float shadowOffsetX)
设置阴影X轴偏移值
|
void |
setShadowOffsetY(float shadowOffsetY)
设置阴影Y轴偏移值
|
void |
setText(java.lang.String text)
设置文字内容
|
void |
setTextAlignment(int aTextAlignment)
设置文字对齐方式
v3.24.0 新增
|
void |
setTextColor(int textColor)
设置字体颜色
|
void |
setTypeface(int typeface)
设置字体样式
|
AliyunCaption |
toCaption() |
java.lang.String |
toString() |
void |
updateInfo() |
getActions, getFrameArray, getHeight, getName, getNodeKey, getRotation, getSource, getTimeArray, getTimelineIn, getTimelineOut, getWidth, getX, getY, isMirror, setFrameArray, setHeight, setMirror, setName, setNodeKey, setRotation, setSource, setTimeArray, setTimelineIn, setTimelineOut, setWidth, setX, setY
getType, setType
public java.lang.String getText()
public void setText(java.lang.String text)
text
- 文字内容public float getScale()
public void setScale(float scale)
scale
- scalepublic float getFontSize()
public void setFontSize(float fontSize)
fontSize
- 字体大小public int getTypeface()
public void setTypeface(int typeface)
typeface
- 字体样式public int getTextColor()
public void setTextColor(int textColor)
fontColor
- 字体颜色public int getOutlineColor()
public void setOutlineColor(int outlineColor)
outlineColor
- 描边颜色public float getOutlineWidth()
public void setOutlineWidth(float outlineWidth)
outlineWidth
- 描边宽度public int getShadowColor()
public void setShadowColor(int shadowColor)
shadowColor
- 阴影颜色public float getShadowOffsetX()
public void setShadowOffsetX(float shadowOffsetX)
shadowOffsetX
- X轴偏移值public float getShadowOffsetY()
public void setShadowOffsetY(float shadowOffsetY)
shadowOffsetY
- Y轴偏移值public Source getFont()
public void setFont(Source font)
font
- 字体资源public Source getFontEffectSource()
public int getTextAlignment()
public void setTextAlignment(int aTextAlignment)
aTextAlignment
- 对齐方式public int getBackgroundColor()
public void setBackgroundColor(int aBackgroundColor)
aBackgroundColor
- 背景颜色public float getBackgroundCornerRadius()
public void setBackgroundCornerRadius(float backgroundCornerRadius)
backgroundCornerRadius
- 圆角public void setFontEffectSource(Source fontEffectSource)
fontEffect
- 花字资源public void setCaption(AliyunCaption caption)
public void updateInfo()
public static CaptionTrack fromCaption(AliyunCaption aCaption)
public AliyunCaption toCaption()
public java.lang.String toString()
toString
in class PhotoPasterTrack