美摄SDK For Android  3.14.0
Public 成员函数 | 所有成员列表
com.meicam.sdk.NvsCompoundCaption类 参考

复合字幕 更多...

类 com.meicam.sdk.NvsCompoundCaption 继承关系图:
com.meicam.sdk.NvsFx com.meicam.sdk.NvsObject com.meicam.sdk.NvsCaptureCompoundCaption com.meicam.sdk.NvsClipCompoundCaption com.meicam.sdk.NvsTimelineCompoundCaption com.meicam.sdk.NvsTrackCompoundCaption

Public 成员函数

int getCaptionCount ()
 获取该复合字幕中子字幕的数量 更多...
 
void setText (int captionIndex, String text)
 设置字幕文本 更多...
 
String getText (int captionIndex)
 获取字幕文本 更多...
 
void setFontFamily (int captionIndex, String family)
 设置字幕字体 更多...
 
String getFontFamily (int captionIndex)
 获取字幕字体的名字 更多...
 
void setTextColor (int captionIndex, NvsColor textColor)
 设置字幕文本颜色 更多...
 
NvsColor getTextColor (int captionIndex)
 获取字幕的颜色值 更多...
 
void setCaptionTranslation (PointF translation)
 设置字幕平移量 更多...
 
PointF getCaptionTranslation ()
 获取字幕的平移量 更多...
 
void translateCaption (PointF translationOffset)
 平移字幕 更多...
 
void setAnchorPoint (PointF anchor)
 设置字幕锚点 更多...
 
PointF getAnchorPoint ()
 获取字幕锚点 更多...
 
void setScaleX (float scale)
 对字幕设置水平缩放系数 更多...
 
float getScaleX ()
 获取字幕水平缩放系数 更多...
 
void setScaleY (float scale)
 对字幕设置垂直缩放系数 更多...
 
float getScaleY ()
 获取字幕垂直缩放系数 更多...
 
void scaleCaption (float scaleFactor, PointF anchor)
 缩放字幕 更多...
 
void setRotationZ (float angle)
 对字幕设置旋转角度 更多...
 
float getRotationZ ()
 获取字幕旋转角度 更多...
 
void rotateCaption (float angle, PointF anchor)
 旋转字幕 更多...
 
void rotateCaptionAroundCenter (float angle, int boundingType)
 绕字幕边框中心旋转 更多...
 
List< PointF > getCaptionBoundingVertices (int captionIndex, int boundingType)
 获取字幕原始边框变换后的顶点位置 更多...
 
boolean isFrameCaption (int captionIndex)
 判断子字幕是否是边框字幕。 更多...
 
List< PointF > getCompoundBoundingVertices (int boundingType)
 获取复合字幕原始边框变换后的顶点位置 更多...
 
void setZValue (float value)
 设置字幕Z值 更多...
 
float getZValue ()
 获取字幕Z值 更多...
 
void setOpacity (float opacity)
 设置字幕透明度 更多...
 
float getOpacity ()
 获取透明度 更多...
 
String getCaptionStylePackageId ()
 获得字幕样式包裹ID 更多...
 
void setDrawOutline (boolean drawOutline, int captionIndex)
 设置字幕描边 更多...
 
boolean getDrawOutline (int captionIndex)
 获取字幕描边状态 更多...
 
void setOutlineColor (NvsColor outlineColor, int captionIndex)
 设置字幕描边的颜色 更多...
 
NvsColor getOutlineColor (int captionIndex)
 获取当前字幕描边的颜色值 更多...
 
void setOutlineWidth (float outlineWidth, int captionIndex)
 设置字幕描边的宽度 更多...
 
float getOutlineWidth (int captionIndex)
 获取当前字幕描边的宽度 更多...
 
void setBackgroundColor (NvsColor backgroundColor, int captionIndex)
 设置字幕文本的背景颜色 更多...
 
NvsColor getBackgroundColor (int captionIndex)
 获取字幕文本的当前背景颜色值 更多...
 
void setCurrentKeyFrameTime (long time)
 设置复合字幕的关键帧时间 更多...
 
boolean setControlPoint (String fxParam, NvsControlPointPair controlPointPair)
 设置字幕的关键帧控制点对 更多...
 
NvsControlPointPair getControlPoint (String fxParam)
 返回关键帧控制点对 更多...
 
boolean removeKeyframeAtTime (String fxParam, long time)
 删除参数指定时间点的关键帧 更多...
 
boolean removeAllKeyframe (String fxParam)
 删除参数的所有关键帧 更多...
 
boolean hasKeyframeList (String fxParam)
 当前参数是否有关键帧列表 更多...
 
long findKeyframeTime (String fxParam, long time, int flags)
 获取指定时间点附近的关键帧 更多...
 
void setDisableElegantTextHeight (int captionIndex, boolean disableElegantTextHeight)
 由于历史遗留因素,美摄SDK在Android平台的水平文字排版时使用了elegant text height特性,这会导致Android平台的水平排版与其它平台的行间距有差别。设置这个属性会禁止Android水平排版使用elegant text height特性。默认值为false。 更多...
 
boolean getDisableElegantTextHeight (int captionIndex)
 获取是否禁止elegant text height特性 更多...
 
void setWeight (int captionIndex, int weight)
 设置字幕权重 更多...
 
int getWeight (int captionIndex)
 获取字幕权重 更多...
 
void setItalic (int captionIndex, boolean italic)
 设置字幕斜体 更多...
 
boolean getItalic (int captionIndex)
 字幕是否设置斜体 更多...
 
void setBold (int captionIndex, boolean bold)
 设置字幕字体是否加粗 更多...
 
boolean getBold (int captionIndex)
 获取字幕字体加粗状态 更多...
 
- Public 成员函数 继承自 com.meicam.sdk.NvsFx
NvsFxDescription getDescription ()
 获取特效的描述 更多...
 
void setIntVal (String fxParam, int val)
 设置特效的整数参数值 更多...
 
int getIntVal (String fxParam)
 获得特效的整数参数值 更多...
 
void setIntValAtTime (String fxParam, int val, long time)
 设置指定时间点上特效的整数参数值 更多...
 
int getIntValAtTime (String fxParam, long time)
 获得指定时间点上特效的整数参数值 更多...
 
void setFloatVal (String fxParam, double val)
 设置特效的浮点数参数值 更多...
 
double getFloatVal (String fxParam)
 获得特效浮点数参数值 更多...
 
void setFloatValAtTime (String fxParam, double val, long time)
 设置指定时间点上特效的浮点数参数值 更多...
 
double getFloatValAtTime (String fxParam, long time)
 获得指定时间点上特效浮点数参数值 更多...
 
void setBooleanVal (String fxParam, boolean val)
 设置特效布尔值参数值 更多...
 
boolean getBooleanVal (String fxParam)
 获得特效的布尔值参数值 更多...
 
void setBooleanValAtTime (String fxParam, boolean val, long time)
 设置指点时间点上特效布尔值参数值 更多...
 
boolean getBooleanValAtTime (String fxParam, long time)
 获得特效的布尔值参数值 更多...
 
void setStringVal (String fxParam, String val)
 设置特效字符串参数值 更多...
 
String getStringVal (String fxParam)
 获得特效字符串参数值 更多...
 
void setStringValAtTime (String fxParam, String val, long time)
 设置指定时间点上特效字符串参数值 更多...
 
String getStringValAtTime (String fxParam, long time, int flags)
 获得指定时间点上特效字符串参数值 更多...
 
void setColorVal (String fxParam, NvsColor val)
 设置特效颜色值参数值 更多...
 
NvsColor getColorVal (String fxParam)
 获得特效颜色值参数值 更多...
 
void setColorValAtTime (String fxParam, NvsColor val, long time)
 设置特效颜色值参数值 更多...
 
NvsColor getColorValAtTime (String fxParam, long time)
 获得特效颜色值参数值 更多...
 
void setPosition2DVal (String fxParam, NvsPosition2D val)
 设置特效二维坐标参数值 更多...
 
NvsPosition2D getPosition2DVal (String fxParam)
 获得特效二维坐标参数值 更多...
 
void setPosition2DValAtTime (String fxParam, NvsPosition2D val, long time)
 设置特效二维坐标参数值 更多...
 
NvsPosition2D getPosition2DValAtTime (String fxParam, long time)
 获得特效二维坐标参数值 更多...
 
void setPosition3DVal (String fxParam, NvsPosition3D val)
 设置特效三维坐标参数值 更多...
 
NvsPosition3D getPosition3DVal (String fxParam)
 获得特效三维坐标参数值 更多...
 
void setPosition3DValAtTime (String fxParam, NvsPosition3D val, long time)
 设置特效三维坐标参数值 更多...
 
NvsPosition3D getPosition3DValAtTime (String fxParam, long time)
 获得特效三维坐标参数值 更多...
 
void setMenuVal (String fxParam, String val)
 设置特效菜单参数值 更多...
 
String getMenuVal (String fxParam)
 获得特效菜单参数值 更多...
 
void setMenuValAtTime (String fxParam, String val, long time)
 设置特效菜单参数值 更多...
 
String getMenuValAtTime (String fxParam, long time)
 获得特效菜单参数值 更多...
 
void setArbDataVal (String fxParam, NvsArbitraryData val)
 设置自定义数据参数值 更多...
 
NvsArbitraryData getArbDataVal (String fxParam)
 返回自定义数据参数值 更多...
 
void setArbDataValAtTime (String fxParam, NvsArbitraryData val, long time)
 设置自定义数据参数值 更多...
 
NvsArbitraryData getArbDataValAtTime (String fxParam, NvsArbitraryData val, long time)
 返回自定义数据参数值 更多...
 
boolean setKeyFrameControlPoint (String fxParam, long time, NvsControlPointPair controlPointPair)
 设置关键帧控制点对 更多...
 
NvsControlPointPair getKeyFrameControlPoint (String fxParam, long time)
 返回关键帧控制点对 更多...
 
boolean setKeyFrameControlPointMode (String fxParam, long time, NvsControlPointModePair controlPointModePair)
 设置关键帧控制点模式对 更多...
 
NvsControlPointModePair getKeyFrameControlPointMode (String fxParam, long time)
 返回关键帧控制点模式对 更多...
 
void setFilterIntensity (float intensity)
 设置滤镜的强度 更多...
 
float getFilterIntensity ()
 获得滤镜的强度 更多...
 
void setFilterMask (boolean useMask)
 设置滤镜遮罩 更多...
 
boolean getFilterMask ()
 获得是否使用滤镜遮罩 更多...
 
void setRegional (boolean isRegional)
 设置滤镜是否为局部滤镜 更多...
 
boolean getRegional ()
 获得滤镜是否为局部滤镜 更多...
 
void setIgnoreBackground (boolean isIgnoreBackground)
 设置局部滤镜是否消除背景 更多...
 
boolean getIgnoreBackground ()
 获得局部滤镜是否消除背景 更多...
 
void setInverseRegion (boolean isInverseRegion)
 设置局部滤镜是否反选区域 更多...
 
boolean getInverseRegion ()
 获得局部滤镜是否反选区域 更多...
 
void setRegion (float[] region)
 设置局部滤镜的控制范围 更多...
 
float[] getRegion ()
 获取局部滤镜的控制范围 更多...
 
void setRegionInfo (NvsMaskRegionInfo info)
 设置局部滤镜的蒙版区域信息 更多...
 
NvsMaskRegionInfo getRegionInfo ()
 获取局部滤镜的蒙版区域信息 更多...
 
void setRegionInfoAtTime (NvsMaskRegionInfo info, long time)
 设置指定时间点局部滤镜的蒙版区域信息 更多...
 
NvsMaskRegionInfo getRegionInfoAtTime (long time)
 获取指定时间点局部滤镜的模板区域信息 更多...
 
void setRegionalFeatherWidth (float featherWidth)
 设置局部滤镜的羽化宽度 更多...
 
float getRegionalFeatherWidth ()
 获得局部滤镜的羽化宽度 更多...
 
void setRegionalFeatherWidthAtTime (float featherWidth, long time)
 设置指定时间点局部滤镜的羽化宽度 更多...
 
float getRegionalFeatherWidthAtTime (long time)
 获得指定时间点局部滤镜的羽化宽度 更多...
 
void setRegionCoordinateSystemType (int type)
 设置局部滤镜所在坐标系类型,默认为NDC坐标系 更多...
 
int getRegionCoordinateSystemType ()
 获得局部滤镜所在坐标系类型 更多...
 
NvsParticleSystemContext getParticleSystemContext ()
 获得粒子特效上下文对象。请参见NvsParticleSystemContext 更多...
 
NvsARFaceContext getARFaceContext ()
 获得人脸特效上下文对象。请参见NvsARFaceContext 更多...
 
NvsPaintingEffectContext getPaintingEffectContext ()
 获得手绘特效上下文对象。请参见NvsPaintingEffectContext 更多...
 
NvsARSceneManipulate getARSceneManipulate ()
 获得AR场景操作对象。请参见NvsARSceneManipulate 更多...
 
void setExprVar (String varName, double varValue)
 设置表达式中定义参数的值 更多...
 
double getExprVar (String varName)
 获得表达式中定义参数的值 更多...
 
void setExprStringVar (String varName, String varValue)
 设置表达式中定义参数的值 更多...
 
String getExprStringVar (String varName)
 获得表达式中定义参数的值 更多...
 
void setExprObjectVar (String varName, Object varValue)
 设置表达式中定义参数的值 更多...
 
Object getExprObjectVar (String varName)
 获得表达式中定义参数的值 更多...
 
void clearExprVar (String varName)
 清空表达式中定义参数的值,并设置为默认值0 更多...
 
void clearExprVarCtx ()
 清空表达式中定义的全部参数的值,并设置为默认值0 更多...
 
- Public 成员函数 继承自 com.meicam.sdk.NvsObject
void setAttachment (String key, Object value)
 为NvsObject对象添加附加的数据,用来标识NvsObject的对象或者其他用途 更多...
 
void setTemplateAttachment (String key, String value)
 为NvsObject对象添加模板资源的附加数据,用来标识NvsObject的模板数据 更多...
 
Object getAttachment (String key)
 获取NvsObject的附件 更多...
 
String getTemplateAttachment (String key)
 获取NvsObject的模板资源附件 更多...
 

静态 Public 属性

边框类型

static final int BOUNDING_TYPE_TEXT = 0
 文字的实际边框 更多...
 
static final int BOUNDING_TYPE_TEXT_FRAME = 1
 文字框的边框 更多...
 
static final int BOUNDING_TYPE_FRAME = 2
 
- 静态 Public 属性 继承自 com.meicam.sdk.NvsFx
static final int KEY_FRAME_FIND_MODE_INPUT_TIME_BEFORE = 1
 查找当前时间点之前的关键帧 更多...
 
static final int KEY_FRAME_FIND_MODE_INPUT_TIME_AFTER = 2
 
static final int REGION_COORDINATE_SYSTEM_TYPE_NDC = 0
 NDC坐标系 更多...
 
static final int REGION_COORDINATE_SYSTEM_TYPE_TIMELINE = 1
 
static final int FACE_WARP_EFFECT_STRATEGY_CUSTOM = 0x7FFFFFFF
 
- 静态 Public 属性 继承自 com.meicam.sdk.NvsObject
static final String TEMPLATE_KEY_REPLACE_ID = "MSTemplate-ReplaceId"
 
static final String TEMPLATE_KEY_FOOTAGE_CAN_REPLACE = "MSTemplate-FootageCanReplace"
 
static final String TEMPLATE_KEY_FOOTAGE_ID = "MSTemplate-FootageId"
 
static final String TEMPLATE_KEY_FOOTAGE_NAME = "MSTemplate-FootageName"
 
static final String TEMPLATE_KEY_FOOTAGE_M3U8_NAME = "MSTemplate-FootageM3U8Name"
 
static final String TEMPLATE_KEY_FOOTAGE_TAGS = "MSTemplate-FootageTags"
 
static final String TEMPLATE_KEY_FOOTAGE_TYPE = "MSTemplate-FootageType"
 
static final String TEMPLATE_KEY_FOOTAGE_NEED_REVERSE = "MSTemplate-FootageNeedReverse"
 
static final String TEMPLATE_KEY_CLIP_RAW_WIDTH = "MSTemplate-ClipRawWidth"
 
static final String TEMPLATE_KEY_CLIP_RAW_HEIGHT = "MSTemplate-ClipRawHeight"
 
static final String TEMPLATE_KEY_VOLUME_TYPE = "MSTemplate-VolumeType"
 
static final String TEMPLATE_KEY_FX_GROUP = "MSTemplate-FxGroup"
 
static final String TEMPLATE_KEY_BEST_SEEK_TIME = "MSTemplate-BestSeekTime"
 
static final String TEMPLATE_KEY_MASK_TYPE = "MSTemplate-MaskType"
 
static final String TEMPLATE_VALUE_MASK_TYPE_LINE = "MSTemplate-MaskType-Line"
 
static final String TEMPLATE_VALUE_MASK_TYPE_MIRROR = "MSTemplate-MaskType-Mirror"
 
static final String TEMPLATE_VALUE_MASK_TYPE_CIRCLE = "MSTemplate-MaskType-Circle"
 
static final String TEMPLATE_VALUE_MASK_TYPE_RECT = "MSTemplate-MaskType-Rect"
 
static final String TEMPLATE_VALUE_MASK_TYPE_HEART = "MSTemplate-MaskType-Heart"
 
static final String TEMPLATE_VALUE_MASK_TYPE_STAR = "MSTemplate-MaskType-Star"
 
static final String TEMPLATE_KEY_TRANS_TYPE_CUT = "MSTemplate-TransType-Cut"
 
static final String TEMPLATE_KEY_CURVE_SPEED_TYPE = "MSTemplate-CurveSpeedType"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_CUSTOM = "MSTemplate-CurveSpeedType-Custom"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_MONTAGE = "MSTemplate-CurveSpeedType-Montage"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_HERO = "MSTemplate-CurveSpeedType-Hero"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_BULLET = "MSTemplate-CurveSpeedType-bullet"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_PLUS = "MSTemplate-CurveSpeedType-Plus"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_IN = "MSTemplate-CurveSpeedType-In"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_OUT = "MSTemplate-CurveSpeedType-Out"
 

额外继承的成员函数

- Protected 成员函数 继承自 com.meicam.sdk.NvsObject
void setInternalObject (long internalObject)
 
long getInternalObject ()
 
- Protected 属性 继承自 com.meicam.sdk.NvsObject
long m_internalObject = 0
 

详细描述

复合字幕

复合字幕是视频上叠加的组合型文字,每个复合字幕包含若干个子字幕。编辑视频时,可以添加和移除复合字幕,并对字幕位置进行调整处理,还可以对字体,颜色属性进行修改。

警告
NvsCompoundCaption类中,所有public API都必须在UI线程使用!!!
自从
2.9.0

成员函数说明

◆ findKeyframeTime()

long com.meicam.sdk.NvsCompoundCaption.findKeyframeTime ( String  fxParam,
long  time,
int  flags 
)
inline

获取指定时间点附近的关键帧

参数
fxParam特效的数据参数
time时间点 (单位为微秒).
flags查找标志位,请参见KEY_FRAME_FIND_MODE.
返回
返回离指定时间点最近的关键帧的时间位置,如果没有找到返回-1

重载 com.meicam.sdk.NvsFx .

◆ getAnchorPoint()

PointF com.meicam.sdk.NvsCompoundCaption.getAnchorPoint ( )
inline

获取字幕锚点

返回
返回字幕锚点
参见
setAnchorPoint

◆ getBackgroundColor()

NvsColor com.meicam.sdk.NvsCompoundCaption.getBackgroundColor ( int  captionIndex)
inline

获取字幕文本的当前背景颜色值

参数
captionIndex想要设置文字的字幕索引号
返回
返回NvsColor对象,表示当前的文本背景颜色值
参见
setBackgroundColor
自从
3.2.0

◆ getBold()

boolean com.meicam.sdk.NvsCompoundCaption.getBold ( int  captionIndex)
inline

获取字幕字体加粗状态

参数
captionIndex想要设置文字的字幕索引号
返回
返回字幕字体加粗状态,YES表示字体已加粗,NO则字体未加粗。
参见
setBold: captionIndex:
自从
3.7.3

◆ getCaptionBoundingVertices()

List<PointF> com.meicam.sdk.NvsCompoundCaption.getCaptionBoundingVertices ( int  captionIndex,
int  boundingType 
)
inline

获取字幕原始边框变换后的顶点位置

参数
captionIndex要获取顶点位置的字幕索引号
boundingType边框类型。请参见边框类型
返回
返回List<PointF>对象,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点

◆ getCaptionCount()

int com.meicam.sdk.NvsCompoundCaption.getCaptionCount ( )
inline

获取该复合字幕中子字幕的数量

返回
子字幕数量

◆ getCaptionStylePackageId()

String com.meicam.sdk.NvsCompoundCaption.getCaptionStylePackageId ( )
inline

获得字幕样式包裹ID

返回
返回获得的字幕样式资源包ID
自从
2.17.1

◆ getCaptionTranslation()

PointF com.meicam.sdk.NvsCompoundCaption.getCaptionTranslation ( )
inline

获取字幕的平移量

返回
返回PointF对象,表示获得的字幕平移量
参见
setCaptionTranslation

◆ getCompoundBoundingVertices()

List<PointF> com.meicam.sdk.NvsCompoundCaption.getCompoundBoundingVertices ( int  boundingType)
inline

获取复合字幕原始边框变换后的顶点位置

参数
boundingType边框类型。请参见边框类型
返回
返回List<PointF>对象,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点

◆ getControlPoint()

NvsControlPointPair com.meicam.sdk.NvsCompoundCaption.getControlPoint ( String  fxParam)
inline

返回关键帧控制点对

参数
fxParam字幕参数的类型
返回
返回获得的控制点信息
参见
setControlPoint
自从
3.2.1

◆ getDisableElegantTextHeight()

boolean com.meicam.sdk.NvsCompoundCaption.getDisableElegantTextHeight ( int  captionIndex)
inline

获取是否禁止elegant text height特性

自从
3.5.2

◆ getDrawOutline()

boolean com.meicam.sdk.NvsCompoundCaption.getDrawOutline ( int  captionIndex)
inline

获取字幕描边状态

参数
captionIndex想要设置文字的字幕索引号
返回
返回boolean值,true表示已描边,false则未描边
自从
3.2.0
参见
setDrawOutline

◆ getFontFamily()

String com.meicam.sdk.NvsCompoundCaption.getFontFamily ( int  captionIndex)
inline

获取字幕字体的名字

参数
captionIndex想要获取字体的字幕索引号
返回
返回字幕字体的名字
参见
setFontFamily

◆ getItalic()

boolean com.meicam.sdk.NvsCompoundCaption.getItalic ( int  captionIndex)
inline

字幕是否设置斜体

参数
组合字幕中字幕的位置
返回
是否斜体
参见
setItalic
自从
3.6.1

◆ getOpacity()

float com.meicam.sdk.NvsCompoundCaption.getOpacity ( )
inline

获取透明度

返回
返回获取的字幕透明度
参见
setOpacity
自从
2.14.0

◆ getOutlineColor()

NvsColor com.meicam.sdk.NvsCompoundCaption.getOutlineColor ( int  captionIndex)
inline

获取当前字幕描边的颜色值

参数
captionIndex想要设置文字的字幕索引号
返回
返回NvsColor对象,表示获得的字幕描边的颜色
自从
3.2.0
参见
setOutlineColor

◆ getOutlineWidth()

float com.meicam.sdk.NvsCompoundCaption.getOutlineWidth ( int  captionIndex)
inline

获取当前字幕描边的宽度

参数
captionIndex想要设置文字的字幕索引号
返回
返回获得的字幕描边的宽度值
自从
3.2.0
参见
setOutlineWidth

◆ getRotationZ()

float com.meicam.sdk.NvsCompoundCaption.getRotationZ ( )
inline

获取字幕旋转角度

返回
返回字幕旋转角度
参见
setRotationZ

◆ getScaleX()

float com.meicam.sdk.NvsCompoundCaption.getScaleX ( )
inline

获取字幕水平缩放系数

返回
返回字幕水平缩放系数
参见
setScaleX
getScaleY

◆ getScaleY()

float com.meicam.sdk.NvsCompoundCaption.getScaleY ( )
inline

获取字幕垂直缩放系数

返回
返回字幕垂直缩放系数
参见
setScaleY
getScaleX

◆ getText()

String com.meicam.sdk.NvsCompoundCaption.getText ( int  captionIndex)
inline

获取字幕文本

参数
captionIndex想要获取文字的字幕索引号
返回
返回字幕文本
参见
setText

◆ getTextColor()

NvsColor com.meicam.sdk.NvsCompoundCaption.getTextColor ( int  captionIndex)
inline

获取字幕的颜色值

参数
captionIndex想要获取文本颜色的字幕索引号
返回
返回NvsColor对象,表示文本的颜色值
参见
setTextColor

◆ getWeight()

int com.meicam.sdk.NvsCompoundCaption.getWeight ( int  captionIndex)
inline

获取字幕权重

参数
组合字幕中字幕的位置
返回
weight opentype中的权重值
参见
setWeight
自从
3.5.2

◆ getZValue()

float com.meicam.sdk.NvsCompoundCaption.getZValue ( )
inline

获取字幕Z值

返回
返回字幕Z值

◆ hasKeyframeList()

boolean com.meicam.sdk.NvsCompoundCaption.hasKeyframeList ( String  fxParam)
inline

当前参数是否有关键帧列表

参数
fxParam特效的数据参数
返回
返回是否有关键帧列表

重载 com.meicam.sdk.NvsFx .

◆ isFrameCaption()

boolean com.meicam.sdk.NvsCompoundCaption.isFrameCaption ( int  captionIndex)
inline

判断子字幕是否是边框字幕。

参数
captionIndex子字幕索引。
返回
是否是边框字幕。

◆ removeAllKeyframe()

boolean com.meicam.sdk.NvsCompoundCaption.removeAllKeyframe ( String  fxParam)
inline

删除参数的所有关键帧

参数
fxParam特效的数据参数
返回
返回是否执行成功

重载 com.meicam.sdk.NvsFx .

◆ removeKeyframeAtTime()

boolean com.meicam.sdk.NvsCompoundCaption.removeKeyframeAtTime ( String  fxParam,
long  time 
)
inline

删除参数指定时间点的关键帧

参数
fxParam特效的数据参数
time时间点 (单位为微秒).
返回
返回是否执行成功

重载 com.meicam.sdk.NvsFx .

◆ rotateCaption()

void com.meicam.sdk.NvsCompoundCaption.rotateCaption ( float  angle,
PointF  anchor 
)
inline

旋转字幕

参数
angle字幕旋转的角度
anchor字幕旋转的锚点

◆ rotateCaptionAroundCenter()

void com.meicam.sdk.NvsCompoundCaption.rotateCaptionAroundCenter ( float  angle,
int  boundingType 
)
inline

绕字幕边框中心旋转

参数
angle字幕旋转的角度
boundingType用于计算中心点的边框类型。请参见边框类型

◆ scaleCaption()

void com.meicam.sdk.NvsCompoundCaption.scaleCaption ( float  scaleFactor,
PointF  anchor 
)
inline

缩放字幕

参数
scaleFactor字幕缩放的因子
anchor字幕缩放的锚点

◆ setAnchorPoint()

void com.meicam.sdk.NvsCompoundCaption.setAnchorPoint ( PointF  anchor)
inline

设置字幕锚点

参数
anchor锚点
参见
getAnchorPoint

◆ setBackgroundColor()

void com.meicam.sdk.NvsCompoundCaption.setBackgroundColor ( NvsColor  backgroundColor,
int  captionIndex 
)
inline

设置字幕文本的背景颜色

参数
backgroundColor文本背景颜色值
captionIndex想要设置文字的字幕索引号
参见
getBackgroundColor
自从
3.2.0

◆ setBold()

void com.meicam.sdk.NvsCompoundCaption.setBold ( int  captionIndex,
boolean  bold 
)
inline

设置字幕字体是否加粗

参数
captionIndex想要设置文字的字幕索引号
bold表示字幕字体是否加粗,YES表示加粗,NO则不加粗。
参见
getBold:
自从
3.7.3

◆ setCaptionTranslation()

void com.meicam.sdk.NvsCompoundCaption.setCaptionTranslation ( PointF  translation)
inline

设置字幕平移量

参数
translation字幕平移的水平和垂直的平移值
参见
getCaptionTranslation

◆ setControlPoint()

boolean com.meicam.sdk.NvsCompoundCaption.setControlPoint ( String  fxParam,
NvsControlPointPair  controlPointPair 
)
inline

设置字幕的关键帧控制点对

参数
fxParam字幕参数的类型
controlPointPair控制点对
参见
getControlPoint
自从
3.2.1

◆ setCurrentKeyFrameTime()

void com.meicam.sdk.NvsCompoundCaption.setCurrentKeyFrameTime ( long  time)
inline

设置复合字幕的关键帧时间

参见
setCurrentKeyFrameTime
自从
3.2.1

◆ setDisableElegantTextHeight()

void com.meicam.sdk.NvsCompoundCaption.setDisableElegantTextHeight ( int  captionIndex,
boolean  disableElegantTextHeight 
)
inline

由于历史遗留因素,美摄SDK在Android平台的水平文字排版时使用了elegant text height特性,这会导致Android平台的水平排版与其它平台的行间距有差别。设置这个属性会禁止Android水平排版使用elegant text height特性。默认值为false。

参数
禁止开启ElegantText Height
自从
3.5.2

◆ setDrawOutline()

void com.meicam.sdk.NvsCompoundCaption.setDrawOutline ( boolean  drawOutline,
int  captionIndex 
)
inline

设置字幕描边

参数
drawOutline是否对字幕描边。true表示对字幕进行描边,false则不描边
captionIndex想要设置文字的字幕索引号
自从
3.2.0
参见
getDrawOutline

◆ setFontFamily()

void com.meicam.sdk.NvsCompoundCaption.setFontFamily ( int  captionIndex,
String  family 
)
inline

设置字幕字体

参数
captionIndex想要设置字体的字幕索引号
family字体名称,若设为空字符串,则设为默认字体
参见
getFontFamily

◆ setItalic()

void com.meicam.sdk.NvsCompoundCaption.setItalic ( int  captionIndex,
boolean  italic 
)
inline

设置字幕斜体

参数
组合字幕中字幕的位置
是否斜体
参见
getItalic
自从
3.6.1

◆ setOpacity()

void com.meicam.sdk.NvsCompoundCaption.setOpacity ( float  opacity)
inline

设置字幕透明度

参数
opacity字幕透明度
参见
getOpacity
自从
2.14.0

◆ setOutlineColor()

void com.meicam.sdk.NvsCompoundCaption.setOutlineColor ( NvsColor  outlineColor,
int  captionIndex 
)
inline

设置字幕描边的颜色

参数
captionIndex想要设置文字的字幕索引号
outlineColor字幕描边颜色值
自从
3.2.0
参见
getOutlineColor

◆ setOutlineWidth()

void com.meicam.sdk.NvsCompoundCaption.setOutlineWidth ( float  outlineWidth,
int  captionIndex 
)
inline

设置字幕描边的宽度

参数
captionIndex想要设置文字的字幕索引号
outlineWidth字幕描边的宽度
自从
3.2.0
参见
getOutlineWidth

◆ setRotationZ()

void com.meicam.sdk.NvsCompoundCaption.setRotationZ ( float  angle)
inline

对字幕设置旋转角度

参数
angle旋转角度
参见
getRotationZ

◆ setScaleX()

void com.meicam.sdk.NvsCompoundCaption.setScaleX ( float  scale)
inline

对字幕设置水平缩放系数

参数
scale水平缩放系数
参见
getScaleX
setScaleY

◆ setScaleY()

void com.meicam.sdk.NvsCompoundCaption.setScaleY ( float  scale)
inline

对字幕设置垂直缩放系数

参数
scale垂直缩放系数
参见
getScaleY
setScaleX

◆ setText()

void com.meicam.sdk.NvsCompoundCaption.setText ( int  captionIndex,
String  text 
)
inline

设置字幕文本

参数
captionIndex想要设置文字的字幕索引号
text字幕文本
参见
getText

◆ setTextColor()

void com.meicam.sdk.NvsCompoundCaption.setTextColor ( int  captionIndex,
NvsColor  textColor 
)
inline

设置字幕文本颜色

参数
captionIndex想要设置文本颜色的字幕索引号
textColor文本颜色值
参见
getTextColor

◆ setWeight()

void com.meicam.sdk.NvsCompoundCaption.setWeight ( int  captionIndex,
int  weight 
)
inline

设置字幕权重

参数
组合字幕中字幕的位置
weightopentype中的权重值
参见
getWeight
自从
3.5.2

◆ setZValue()

void com.meicam.sdk.NvsCompoundCaption.setZValue ( float  value)
inline

设置字幕Z值

参数
valuez值

◆ translateCaption()

void com.meicam.sdk.NvsCompoundCaption.translateCaption ( PointF  translationOffset)
inline

平移字幕

参数
translationOffset字幕平移的水平和垂直的偏移值
参见
setCaptionTranslation
getCaptionTranslation

类成员变量说明

◆ BOUNDING_TYPE_FRAME

final int com.meicam.sdk.NvsCompoundCaption.BOUNDING_TYPE_FRAME = 2
static

包括装饰在内的整体边框

◆ BOUNDING_TYPE_TEXT

final int com.meicam.sdk.NvsCompoundCaption.BOUNDING_TYPE_TEXT = 0
static

文字的实际边框

◆ BOUNDING_TYPE_TEXT_FRAME

final int com.meicam.sdk.NvsCompoundCaption.BOUNDING_TYPE_TEXT_FRAME = 1
static

文字框的边框


该类的文档由以下文件生成: