美摄SDK For iOS  3.14.0
构造函数 | 属性 | 所有成员列表
NvsCompoundCaption类 参考

#import <NvsCompoundCaption.h>

类 NvsCompoundCaption 继承关系图:
NvsFx NvsObject NvsCaptureCompoundCaption NvsClipCompoundCaption NvsTimelineCompoundCaption NvsTrackCompoundCaption

构造函数

(void) - setText:text:
 设置字幕文本 更多...
 
(NSString *) - getText:
 获取字幕文本 更多...
 
(void) - setFontFamily:family:
 设置字幕字体 更多...
 
(NSString *) - getFontFamily:
 获取字幕字体的名字 更多...
 
(void) - setTextColor:textColor:
 设置字幕文本颜色 更多...
 
(NvsColor- getTextColor:
 获取字幕的颜色值 更多...
 
(void) - setCaptionTranslation:
 设置字幕平移量 更多...
 
(CGPoint) - getCaptionTranslation
 获取字幕的平移量 更多...
 
(void) - translateCaption:
 平移字幕 更多...
 
(void) - setAnchorPoint:
 设置字幕锚点 更多...
 
(CGPoint) - getAnchorPoint
 获取字幕锚点 更多...
 
(void) - setScaleX:
 对字幕设置水平缩放系数 更多...
 
(float) - getScaleX
 获取字幕水平缩放系数 更多...
 
(void) - setScaleY:
 对字幕设置垂直缩放系数 更多...
 
(float) - getScaleY
 获取字幕垂直缩放系数 更多...
 
(void) - scaleCaption:anchor:
 缩放字幕 更多...
 
(void) - setRotationZ:
 对字幕设置旋转角度 更多...
 
(float) - getRotationZ
 获取字幕旋转角度 更多...
 
(void) - rotateCaption:anchor:
 旋转字幕 更多...
 
(void) - rotateCaptionAroundCenter:boundingType:
 绕字幕边框中心旋转 更多...
 
(NSArray *) - getCaptionBoundingVertices:boundingType:
 获取字幕原始边框变换后的顶点位置 更多...
 
(NSArray *) - getCompoundBoundingVertices:
 获取复合字幕原始边框变换后的顶点位置 更多...
 
(void) - setZValue:
 设置字幕Z值 更多...
 
(float) - getZValue
 获取字幕Z值 更多...
 
(void) - setOpacity:
 设置字幕透明度 更多...
 
(float) - getOpacity
 获取字幕透明度 更多...
 
(void) - setDrawOutline:captionIndex:
 设置字幕描边 更多...
 
(BOOL) - getDrawOutline:
 获取字幕描边状态 更多...
 
(void) - setOutlineColor:captionIndex:
 设置字幕描边的颜色 更多...
 
(NvsColor- getOutlineColor:
 获取当前字幕描边的颜色值 更多...
 
(void) - setOutlineWidth:captionIndex:
 设置字幕描边的宽度 更多...
 
(float) - getOutlineWidth:
 获取当前字幕描边的宽度 更多...
 
(void) - setBackgroundColor:captionIndex:
 设置字幕文本的背景颜色 更多...
 
(NvsColor- getBackgroundColor:
 获取字幕文本的当前背景颜色值 更多...
 
(void) - setBold:captionIndex:
 设置字幕字体是否加粗 更多...
 
(BOOL) - getBold:
 获取字幕字体加粗状态 更多...
 
(void) - setWeight:captionIndex:
 设置字幕权重 更多...
 
(int) - getWeight:
 获取字幕权重值 更多...
 
(void) - setItalic:captionIndex:
 设置字幕斜体 更多...
 
(BOOL) - getItalic:
 获取字幕斜体状态 更多...
 
(void) - setCurrentKeyFrameTime:
 设置复合字幕的关键帧时间 更多...
 
(bool) - setControlPoint:controlPointPair:
 设置字幕的关键帧控制点对 更多...
 
(NvsControlPointPair *) - getControlPoint:
 返回关键帧控制点对 更多...
 
(bool) - removeKeyframeAtTime:time:
 删除参数指定时间点的关键帧 更多...
 
(bool) - removeAllKeyframe:
 删除参数的所有关键帧 更多...
 
(bool) - hasKeyframeList:
 当前参数是否有关键帧列表 更多...
 
(int64_t) - findKeyframeTime:time:flags:
 获取指定时间点附近的关键帧 更多...
 
- 构造函数 继承自 NvsFx
(void) - setIntVal:val:
 设置特效的整数参数值 更多...
 
(int) - getIntVal:
 获得特效的整数参数值 更多...
 
(void) - setIntValAtTime:val:time:
 设置指定时间点上特效的整数参数值 更多...
 
(int) - getIntValAtTime:time:
 获得指定时间点上特效的整数参数值 更多...
 
(void) - setFloatVal:val:
 设置特效的浮点数参数值 更多...
 
(double) - getFloatVal:
 获得特效浮点数参数值 更多...
 
(void) - setFloatValAtTime:val:time:
 设置指定时间点上特效的浮点数参数值 更多...
 
(double) - getFloatValAtTime:time:
 获得指定时间点上特效浮点数参数值 更多...
 
(void) - setBooleanVal:val:
 设置特效布尔值参数值 更多...
 
(BOOL) - getBooleanVal:
 获得特效的布尔值参数值 更多...
 
(void) - setBooleanValAtTime:val:time:
 设置指点时间点上特效布尔值参数值 更多...
 
(BOOL) - getBooleanValAtTime:time:
 获得特效的布尔值参数值 更多...
 
(void) - setStringVal:val:
 设置特效字符串参数值 更多...
 
(NSString *) - getStringVal:
 获得特效字符串参数值 更多...
 
(void) - setStringValAtTime:val:time:
 设置指定时间点上特效字符串参数值 更多...
 
(NSString *) - getStringValAtTime:time:
 获得指定时间点上特效字符串参数值 更多...
 
(void) - setColorVal:val:
 设置特效颜色值参数值 更多...
 
(NvsColor- getColorVal:
 获得特效颜色值参数值 更多...
 
(void) - setColorValAtTime:val:time:
 设置特效颜色值参数值 更多...
 
(NvsColor- getColorValAtTime:time:
 获得特效颜色值参数值 更多...
 
(void) - setPosition2DVal:val:
 设置特效二维坐标参数值 更多...
 
(NvsPosition2D- getPosition2DVal:
 获得特效二维坐标参数值 更多...
 
(void) - setPosition2DValAtTime:val:time:
 设置特效二维坐标参数值 更多...
 
(NvsPosition2D- getPosition2DValAtTime:time:
 获得特效二维坐标参数值 更多...
 
(void) - setPosition3DVal:val:
 设置特效三维坐标参数值 更多...
 
(NvsPosition3D- getPosition3DVal:
 获得特效三维坐标参数值 更多...
 
(void) - setPosition3DValAtTime:val:time:
 设置特效三维坐标参数值 更多...
 
(NvsPosition3D- getPosition3DValAtTime:time:
 获得特效三维坐标参数值 更多...
 
(void) - setMenuVal:val:
 设置特效菜单参数值 更多...
 
(NSString *) - getMenuVal:
 获得特效菜单参数值 更多...
 
(void) - setMenuValAtTime:val:time:
 设置特效菜单参数值 更多...
 
(NSString *) - getMenuValAtTime:time:
 获得特效菜单参数值 更多...
 
(void) - setArbDataVal:val:
 设置自定义数据参数值 更多...
 
(NvsArbitraryData *) - getArbDataVal:
 返回自定义数据参数值 更多...
 
(void) - setArbDataValAtTime:val:time:
 设置自定义数据参数值 更多...
 
(NvsArbitraryData *) - getArbDataValAtTime:time:
 返回自定义数据参数值 更多...
 
(bool) - setKeyFrameControlPoint:time:controlPointPair:
 设置关键帧控制点对 更多...
 
(NvsControlPointPair *) - getKeyFrameControlPoint:time:
 返回关键帧控制点对 更多...
 
(bool) - setKeyFrameControlPointMode:time:controlPointModePair:
 设置关键帧控制点对 更多...
 
(NvsControlPointModePair *) - getKeyFrameControlPointMode:time:
 返回关键帧控制点模式对 更多...
 
(void) - setFilterIntensity:
 设置滤镜的强度 更多...
 
(float) - getFilterIntensity
 获得滤镜的强度 更多...
 
(void) - setFilterMask:
 设置滤镜遮罩 更多...
 
(bool) - getFilterMask
 获得是否使用滤镜遮罩 更多...
 
(void) - setRegional:
 设置滤镜是否为局部滤镜 更多...
 
(BOOL) - getRegional
 获得滤镜是否为局部滤镜 更多...
 
(void) - setIgnoreBackground:
 设置局部滤镜是否消除背景 更多...
 
(BOOL) - getIgnoreBackground
 获得局部滤镜是否消除背景 更多...
 
(void) - setInverseRegion:
 设置局部滤镜是否反选区域 更多...
 
(BOOL) - getInverseRegion
 获得局部滤镜是否反选区域 更多...
 
(NSArray *) - getRegion
 获取局部滤镜的控制范围 更多...
 
(void) - setRegion:
 设置局部滤镜的控制范围 更多...
 
(NvsMaskRegionInfo *) - getRegionInfo
 获取局部滤镜的蒙版区域信息 更多...
 
(void) - setRegionInfo:
 设置局部滤镜的蒙版区域信息 更多...
 
(void) - setRegionInfoAtTime:time:
 设置指定时间点局部滤镜的蒙版区域信息 更多...
 
(NvsMaskRegionInfo *) - getRegionInfoAtTime:
 获取指定时间点局部滤镜的模板区域信息 更多...
 
(void) - setRegionalFeatherWidth:
 设置局部滤镜的羽化宽度 更多...
 
(float) - getRegionalFeatherWidth
 获得局部滤镜的羽化宽度 更多...
 
(void) - setRegionalFeatherWidthAtTime:time:
 设置指定时间点局部滤镜的羽化宽度 更多...
 
(float) - getRegionalFeatherWidthAtTime:
 获得指定时间点局部滤镜的羽化宽度 更多...
 
(void) - setRegionCoordinateSystemType:
 设置局部滤镜所在坐标系类型,默认为NDC坐标系 更多...
 
(int) - getRegionCoordinateSystemType
 获得局部滤镜所在坐标系类型 更多...
 
(NvsParticleSystemContext *) - getParticleSystemContext
 获得粒子特效上下文指针。请参见NvsParticleSystemContext 更多...
 
(NvsARFaceContext *) - getARFaceContext
 获得人脸特效上下文指针。请参见NvsARFaceContext 更多...
 
(NvsPaintingEffectContext *) - getPaintingEffectContext
 获得手绘特效上下文指针。请参见NvsPaintingEffectContext 更多...
 
(NvsARSceneManipulate *) - getARSceneManipulate
 获得AR场景操作指针。请参见NvsARSceneManipulate 更多...
 
(void) - setExprVar:varValue:
 设置表达式中定义参数的值 更多...
 
(double) - getExprVar:
 获得表达式中定义参数的值 更多...
 
(void) - setColorExprVar:varValue:
 设置颜色类型表达式中定义参数的值 更多...
 
(NvsColor- getColorExprVar:
 获得颜色表达式中定义参数的值 更多...
 
(void) - clearExprVar:
 清空表达式中定义参数的值,并设置为默认值0 更多...
 
(void) - clearExprVarCtx
 清空表达式中定义的全部参数的值,并设置为默认值0 更多...
 
- 构造函数 继承自 NvsObject
(void) - setAttachment:forKey:
 给NvsObject对象添加附件,用来标识NvsObject的对象或者用于其他用途 更多...
 
(void) - setTemplateAttachment:forKey:
 为NvsObject对象添加模板资源的附加数据,用来标识NvsObject的模板数据 更多...
 
(NSObject *) - getAttachment:
 获取已经添加的附件 更多...
 
(NSString *) - getTemplateAttachment:
 获取NvsObject的模板资源附件 更多...
 

属性

NSString * captionStylePackageId
 字幕样式包裹ID 更多...
 
NSInteger captionCount
 获取该复合字幕中子字幕的数量 更多...
 
- 属性 继承自 NvsFx
NvsFxDescriptiondescription
 特效描述 更多...
 

函数文档

◆ findKeyframeTime:time:flags:

- (int64_t) findKeyframeTime: (NSString *)  fxParam
time: (int64_t)  time
flags: (int)  flags 

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

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

实现了 NvsFx.

◆ getAnchorPoint

- (CGPoint) getAnchorPoint

获取字幕锚点

返回
返回字幕锚点
参见
setAnchorPoint

◆ getBackgroundColor:

- (NvsColor) getBackgroundColor: (int)  captionIndex

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

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

◆ getBold:

- (BOOL) getBold: (int)  captionIndex

获取字幕字体加粗状态

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

◆ getCaptionBoundingVertices:boundingType:

- (NSArray *) getCaptionBoundingVertices: (NSInteger)  captionIndex
boundingType: (NvsBoundingType boundingType 

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

参数
captionIndex要获取顶点位置的字幕索引号
boundingType边框类型。请参见边框类型
返回
返回NSArray对象,里面的对象类型为NSValue,而实际包含的数据类型为CGPoint,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点

◆ getCaptionTranslation

- (CGPoint) getCaptionTranslation

获取字幕的平移量

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

◆ getCompoundBoundingVertices:

- (NSArray *) getCompoundBoundingVertices: (NvsBoundingType boundingType

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

参数
boundingType边框类型。请参见边框类型
返回
返回NSArray对象,里面的对象类型为NSValue,而实际包含的数据类型为CGPoint,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点

◆ getControlPoint:

- (NvsControlPointPair*) getControlPoint: (NSString *)  fxParam

返回关键帧控制点对

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

◆ getDrawOutline:

- (BOOL) getDrawOutline: (int)  captionIndex

获取字幕描边状态

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

◆ getFontFamily:

- (NSString *) getFontFamily: (NSInteger)  captionIndex

获取字幕字体的名字

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

◆ getItalic:

- (BOOL) getItalic: (int)  captionIndex

获取字幕斜体状态

参数
captionIndex字幕索引号
返回
字幕斜体状态

◆ getOpacity

- (float) getOpacity

获取字幕透明度

返回
返回字幕透明度
参见
- setOpacity:

◆ getOutlineColor:

- (NvsColor) getOutlineColor: (int)  captionIndex

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

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

◆ getOutlineWidth:

- (float) getOutlineWidth: (int)  captionIndex

获取当前字幕描边的宽度

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

◆ getRotationZ

- (float) getRotationZ

获取字幕旋转角度

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

◆ getScaleX

- (float) getScaleX

获取字幕水平缩放系数

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

◆ getScaleY

- (float) getScaleY

获取字幕垂直缩放系数

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

◆ getText:

- (NSString *) getText: (NSInteger)  captionIndex

获取字幕文本

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

◆ getTextColor:

- (NvsColor) getTextColor: (NSInteger)  captionIndex

获取字幕的颜色值

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

◆ getWeight:

- (int) getWeight: (int)  captionIndex

获取字幕权重值

参数
captionIndex想要设置文字的字幕索引号
返回
字幕权重值
参见
setWeight: captionIndex:

◆ getZValue

- (float) getZValue

获取字幕Z值

返回
返回字幕Z值

◆ hasKeyframeList:

- (bool) hasKeyframeList: (NSString *)  fxParam

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

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

实现了 NvsFx.

◆ removeAllKeyframe:

- (bool) removeAllKeyframe: (NSString *)  fxParam

删除参数的所有关键帧

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

实现了 NvsFx.

◆ removeKeyframeAtTime:time:

- (bool) removeKeyframeAtTime: (NSString *)  fxParam
time: (int64_t)  time 

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

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

实现了 NvsFx.

◆ rotateCaption:anchor:

- (void) rotateCaption: (float)  angle
anchor: (CGPoint)  anchor 

旋转字幕

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

◆ rotateCaptionAroundCenter:boundingType:

- (void) rotateCaptionAroundCenter: (float)  angle
boundingType: (NvsBoundingType boundingType 

绕字幕边框中心旋转

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

◆ scaleCaption:anchor:

- (void) scaleCaption: (float)  scaleFactor
anchor: (CGPoint)  anchor 

缩放字幕

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

◆ setAnchorPoint:

- (void) setAnchorPoint: (CGPoint)  anchor

设置字幕锚点

参数
anchor锚点
参见
- getAnchorPoint

◆ setBackgroundColor:captionIndex:

- (void) setBackgroundColor: (NvsColor backgroundColor
captionIndex: (int)  captionIndex 

设置字幕文本的背景颜色

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

◆ setBold:captionIndex:

- (void) setBold: (BOOL)  bold
captionIndex: (int)  captionIndex 

设置字幕字体是否加粗

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

◆ setCaptionTranslation:

- (void) setCaptionTranslation: (CGPoint)  translation

设置字幕平移量

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

◆ setControlPoint:controlPointPair:

- (bool) setControlPoint: (NSString *)  fxParam
controlPointPair: (NvsControlPointPair *)  controlPointPair 

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

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

◆ setCurrentKeyFrameTime:

- (void) setCurrentKeyFrameTime: (int64_t)  time

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

参见
setCurrentKeyFrameTime
自从
3.2.1

◆ setDrawOutline:captionIndex:

- (void) setDrawOutline: (BOOL)  drawOutline
captionIndex: (int)  captionIndex 

设置字幕描边

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

◆ setFontFamily:family:

- (void) setFontFamily: (NSInteger)  captionIndex
family: (NSString *)  family 

设置字幕字体

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

◆ setItalic:captionIndex:

- (void) setItalic: (BOOL)  italic
captionIndex: (int)  captionIndex 

设置字幕斜体

参数
italic用于设置字幕是否应用斜体
captionIndex想要设置的字幕索引号

◆ setOpacity:

- (void) setOpacity: (float)  opacity

设置字幕透明度

参数
value字幕透明度
参见
- getOpacity

◆ setOutlineColor:captionIndex:

- (void) setOutlineColor: (NvsColor outlineColor
captionIndex: (int)  captionIndex 

设置字幕描边的颜色

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

◆ setOutlineWidth:captionIndex:

- (void) setOutlineWidth: (float)  outlineWidth
captionIndex: (int)  captionIndex 

设置字幕描边的宽度

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

◆ setRotationZ:

- (void) setRotationZ: (float)  angle

对字幕设置旋转角度

参数
angle旋转角度
参见
- getRotationZ

◆ setScaleX:

- (void) setScaleX: (float)  scale

对字幕设置水平缩放系数

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

◆ setScaleY:

- (void) setScaleY: (float)  scale

对字幕设置垂直缩放系数

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

◆ setText:text:

- (void) setText: (NSInteger)  captionIndex
text: (NSString *)  text 

设置字幕文本

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

◆ setTextColor:textColor:

- (void) setTextColor: (NSInteger)  captionIndex
textColor: (const NvsColor *)  textColor 

设置字幕文本颜色

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

◆ setWeight:captionIndex:

- (void) setWeight: (int)  weight
captionIndex: (int)  captionIndex 

设置字幕权重

参数
weightopentype中的权重值
captionIndex想要设置文字的字幕索引号
参见
- getWeight:

◆ setZValue:

- (void) setZValue: (float)  value

设置字幕Z值

参数
valuez值

◆ translateCaption:

- (void) translateCaption: (CGPoint)  translationOffset

平移字幕

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

属性说明

◆ captionCount

- (NSInteger) captionCount
readatomicassign

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

返回
子字幕数量

◆ captionStylePackageId

- (NSString*) captionStylePackageId
readatomicassign

字幕样式包裹ID


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