#import <NvsVideoEffectCompoundCaption.h>
◆ changeInPoint:
- (int64_t) changeInPoint: |
|
(int64_t) |
newInPoint |
|
改变字幕显示的入点
- 参数
-
- 返回
- 返回字幕显示的入点(单位微秒)
- 参见
- changeOutPoint
-
getInPoint
-
movePosition
◆ changeOutPoint:
- (int64_t) changeOutPoint: |
|
(int64_t) |
newOutPoint |
|
改变字幕显示的出点
- 参数
-
- 返回
- 返回字幕显示的出点(单位微秒)
- 参见
- changeInPoint
-
getOutPoint
-
movePosition
◆ findKeyframeTime:time:flags:
- (int64_t) findKeyframeTime: |
|
(NSString *) |
fxParam |
time: |
|
(int64_t) |
time |
flags: |
|
(int) |
flags |
|
|
| |
获取指定时间点附近的关键帧
- 参数
-
fxParam | 特效的数据参数 |
time | 时间点 (单位为微秒). |
flags | 查找标志位,请参见KEY_FRAME_FIND_MODE. |
- 返回
- 返回离指定时间点最近的关键帧的时间位置,如果没有找到返回-1
- 自从
- 3.7.3
实现了 NvsEffect.
◆ getAnchorPoint
- (CGPoint) getAnchorPoint |
|
|
|
获取字幕锚点
- 返回
- 返回字幕锚点
- 参见
- setAnchorPoint
◆ getBackgroundColor:
获取字幕文本的当前背景颜色值
- 参数
-
- 返回
- 返回NvsEffectColor对象,表示当前的文本背景颜色值
- 参见
- setBackgroundColor
- 自从
- 3.7.3
◆ getBold:
- (BOOL) getBold: |
|
(int) |
captionIndex |
|
获取字幕字体加粗状态
- 参数
-
- 返回
- 返回字幕字体加粗状态,YES表示字体已加粗,NO则字体未加粗。
- 参见
- setBold: captionIndex:
- 自从
- 3.7.3
◆ getCaptionBoundingVertices:boundingType:
- (NSArray *) getCaptionBoundingVertices: |
|
(NSInteger) |
captionIndex |
boundingType: |
|
(NvsEffectBoundingType) |
boundingType |
|
|
| |
获取字幕原始边框变换后的顶点位置
- 参数
-
captionIndex | 要获取顶点位置的字幕索引号 |
boundingType | 边框类型。请参见边框类型 |
- 返回
- 返回NSArray对象,里面的对象类型为NSValue,而实际包含的数据类型为CGPoint,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点
◆ getCaptionTranslation
- (CGPoint) getCaptionTranslation |
|
|
|
获取字幕的平移量
- 返回
- 返回CGPoint对象,表示获得的字幕平移量
- 参见
- setCaptionTranslation
◆ getCompoundBoundingVertices:
获取复合字幕原始边框变换后的顶点位置
- 参数
-
- 返回
- 返回NSArray对象,里面的对象类型为NSValue,而实际包含的数据类型为CGPoint,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点
◆ getControlPoint:
返回关键帧控制点对
- 参数
-
- 返回
- 返回获得的控制点信息
- 参见
- setControlPoint: controlPointPair
- 自从
- 3.7.3
◆ getDrawOutline:
- (BOOL) getDrawOutline: |
|
(int) |
captionIndex |
|
获取字幕描边状态
- 参数
-
- 返回
- 返回boolean值,true表示已描边,false则未描边
- 自从
- 3.7.3
- 参见
- setDrawOutline
◆ getFontFamily:
- (NSString *) getFontFamily: |
|
(NSInteger) |
captionIndex |
|
获取字幕字体的名字
- 参数
-
- 返回
- 返回字幕字体的名字
- 参见
- setFontFamily
◆ getItalic:
- (BOOL) getItalic: |
|
(int) |
captionIndex |
|
获取字幕斜体状态
- 参数
-
- 返回
- 字幕斜体状态
- 自从
- 3.7.3
◆ getOpacity
◆ getOutlineColor:
获取当前字幕描边的颜色值
- 参数
-
- 返回
- 返回NvsEffectColor对象,表示获得的字幕描边的颜色
- 自从
- 3.7.3
- 参见
- setOutlineColor
◆ getOutlineWidth:
- (float) getOutlineWidth: |
|
(int) |
captionIndex |
|
获取当前字幕描边的宽度
- 参数
-
- 返回
- 返回获得的字幕描边的宽度值
- 自从
- 3.7.3
- 参见
- setOutlineWidth
◆ getRotationZ
获取字幕旋转角度
- 返回
- 返回字幕旋转角度
- 参见
- setRotationZ
◆ getScaleX
◆ getScaleY
◆ getText:
- (NSString *) getText: |
|
(NSInteger) |
captionIndex |
|
获取字幕文本
- 参数
-
- 返回
- 返回字幕文本
- 参见
- setText
◆ getTextColor:
获取字幕的颜色值
- 参数
-
captionIndex | 想要获取文本颜色的字幕索引号 |
- 返回
- 返回NvsEffectColor对象,表示文本的颜色值
- 参见
- setTextColor
◆ getWeight:
- (int) getWeight: |
|
(int) |
captionIndex |
|
获取字幕权重值
- 参数
-
- 返回
- 字幕权重值
- 参见
- setWeight: captionIndex:
◆ getZValue
◆ hasKeyframeList:
- (bool) hasKeyframeList: |
|
(NSString *) |
fxParam |
|
当前参数是否有关键帧列表
- 参数
-
- 返回
- 返回是否有关键帧列表
- 自从
- 3.7.3
实现了 NvsEffect.
◆ movePosition:
- (void) movePosition: |
|
(int64_t) |
offset |
|
改变字幕显示位置(入点和出点同时偏移offset值)
- 参数
-
- 参见
- changeInPoint
-
changeOutPoint
◆ removeAllKeyframe:
- (bool) removeAllKeyframe: |
|
(NSString *) |
fxParam |
|
删除参数的所有关键帧
- 参数
-
- 返回
- 返回是否执行成功
- 自从
- 3.7.3
实现了 NvsEffect.
◆ removeKeyframeAtTime:time:
- (bool) removeKeyframeAtTime: |
|
(NSString *) |
fxParam |
time: |
|
(int64_t) |
time |
|
|
| |
删除参数指定时间点的关键帧
- 参数
-
fxParam | 特效的数据参数 |
time | 时间点 (单位为微秒). |
- 返回
- 返回是否执行成功
- 自从
- 3.7.3
实现了 NvsEffect.
◆ rotateCaption:anchor:
- (void) rotateCaption: |
|
(float) |
angle |
anchor: |
|
(CGPoint) |
anchor |
|
|
| |
旋转字幕
- 参数
-
angle | 字幕旋转的角度 |
anchor | 字幕旋转的锚点 |
◆ rotateCaptionAroundCenter:boundingType:
绕字幕边框中心旋转
- 参数
-
angle | 字幕旋转的角度 |
boundingType | 用于计算中心点的边框类型。请参见边框类型 |
◆ scaleCaption:anchor:
- (void) scaleCaption: |
|
(float) |
scaleFactor |
anchor: |
|
(CGPoint) |
anchor |
|
|
| |
缩放字幕
- 参数
-
scaleFactor | 字幕缩放的因子 |
anchor | 字幕缩放的锚点 |
◆ setAnchorPoint:
- (void) setAnchorPoint: |
|
(CGPoint) |
anchor |
|
◆ setBackgroundColor:captionIndex:
- (void) setBackgroundColor: |
|
(NvsEffectColor) |
backgroundColor |
captionIndex: |
|
(int) |
captionIndex |
|
|
| |
设置字幕文本的背景颜色
- 参数
-
backgroundColor | 文本背景颜色值 |
captionIndex | 想要设置文字的字幕索引号 |
- 参见
- getBackgroundColor
- 自从
- 3.7.3
◆ setBold:captionIndex:
- (void) setBold: |
|
(BOOL) |
bold |
captionIndex: |
|
(int) |
captionIndex |
|
|
| |
设置字幕字体是否加粗
- 参数
-
bold | 表示字幕字体是否加粗,YES表示加粗,NO则不加粗。 |
captionIndex | 想要设置文字的字幕索引号 |
- 参见
- - getBold:
- 自从
- 3.7.3
◆ setCaptionTranslation:
- (void) setCaptionTranslation: |
|
(CGPoint) |
translation |
|
◆ setControlPoint:controlPointPair:
- (bool) setControlPoint: |
|
(NSString *) |
fxParam |
controlPointPair: |
|
(NvsControlPointPair *) |
controlPointPair |
|
|
| |
设置字幕的关键帧控制点对
- 参数
-
fxParam | 字幕参数的类型 |
controlPointPair | 控制点对 |
- 参见
- getControlPoint
- 自从
- 3.7.3
◆ setCurrentKeyFrameTime:
- (void) setCurrentKeyFrameTime: |
|
(int64_t) |
time |
|
设置复合字幕的关键帧时间
- 参见
- setCurrentKeyFrameTime
- 自从
- 3.7.3
◆ setDrawOutline:captionIndex:
- (void) setDrawOutline: |
|
(BOOL) |
drawOutline |
captionIndex: |
|
(int) |
captionIndex |
|
|
| |
设置字幕描边
- 参数
-
drawOutline | 是否对字幕描边。true表示对字幕进行描边,false则不描边 |
captionIndex | 想要设置文字的字幕索引号 |
- 自从
- 3.7.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 |
|
◆ setOutlineColor:captionIndex:
- (void) setOutlineColor: |
|
(NvsEffectColor) |
outlineColor |
captionIndex: |
|
(int) |
captionIndex |
|
|
| |
设置字幕描边的颜色
- 参数
-
captionIndex | 想要设置文字的字幕索引号 |
outlineColor | 字幕描边颜色值 |
- 自从
- 3.7.3
- 参见
- getOutlineColor
◆ setOutlineWidth:captionIndex:
- (void) setOutlineWidth: |
|
(float) |
outlineWidth |
captionIndex: |
|
(int) |
captionIndex |
|
|
| |
设置字幕描边的宽度
- 参数
-
captionIndex | 想要设置文字的字幕索引号 |
outlineWidth | 字幕描边的宽度 |
- 自从
- 3.7.3
- 参见
- getOutlineWidth
◆ setRotationZ:
- (void) setRotationZ: |
|
(float) |
angle |
|
◆ setScaleX:
- (void) setScaleX: |
|
(float) |
scale |
|
◆ setScaleY:
- (void) setScaleY: |
|
(float) |
scale |
|
◆ setText:text:
- (void) setText: |
|
(NSInteger) |
captionIndex |
text: |
|
(NSString *) |
text |
|
|
| |
设置字幕文本
- 参数
-
captionIndex | 想要设置文字的字幕索引号 |
text | 字幕文本 |
- 参见
- getText
◆ setTextColor:textColor:
- (void) setTextColor: |
|
(NSInteger) |
captionIndex |
textColor: |
|
(const NvsEffectColor *) |
textColor |
|
|
| |
设置字幕文本颜色
- 参数
-
captionIndex | 想要设置文本颜色的字幕索引号 |
textColor | 文本颜色值 |
- 参见
- getTextColor
◆ setVideoResolution:
设置复合字幕渲染的画幅解析度
- 参数
-
- 自从
- 2.20.0
◆ setWeight:captionIndex:
- (void) setWeight: |
|
(int) |
weight |
captionIndex: |
|
(int) |
captionIndex |
|
|
| |
设置字幕权重
- 参数
-
weight | opentype中的权重值 |
captionIndex | 想要设置文字的字幕索引号 |
- 参见
- - getWeight:
◆ setZValue:
- (void) setZValue: |
|
(float) |
value |
|
◆ translateCaption:
- (void) translateCaption: |
|
(CGPoint) |
translationOffset |
|
◆ captionCount
- (NSInteger) captionCount |
|
readatomicassign |
◆ captionStylePackageId
- (NSString*) captionStylePackageId |
|
readatomicassign |
◆ inPoint
◆ outPoint
该类的文档由以下文件生成: