#import <NvsVideoEffectCompoundCaption.h>
◆ changeInPoint:
- (int64_t) changeInPoint: |
|
(int64_t) |
newInPoint |
|
改变字幕显示的入点
- 参数
-
- 返回
- 返回字幕显示的入点(单位微秒)
- 参见
- changeOutPoint
-
getInPoint
-
movePosition
◆ changeOutPoint:
- (int64_t) changeOutPoint: |
|
(int64_t) |
newOutPoint |
|
改变字幕显示的出点
- 参数
-
- 返回
- 返回字幕显示的出点(单位微秒)
- 参见
- changeInPoint
-
getOutPoint
-
movePosition
◆ getAnchorPoint
- (CGPoint) getAnchorPoint |
|
|
|
获取字幕锚点
- 返回
- 返回字幕锚点
- 参见
- setAnchorPoint
◆ getCaptionBoundingVertices:boundingType:
- (NSArray *) getCaptionBoundingVertices: |
|
(NSInteger) |
captionIndex |
boundingType: |
|
(NvsEffectBoundingType) |
boundingType |
|
|
| |
获取字幕原始边框变换后的顶点位置
- 参数
-
captionIndex | 要获取顶点位置的字幕索引号 |
boundingType | 边框类型。请参见边框类型 |
- 返回
- 返回NSArray对象,里面的对象类型为NSValue,而实际包含的数据类型为CGPoint,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点
◆ getCaptionTranslation
- (CGPoint) getCaptionTranslation |
|
|
|
获取字幕的平移量
- 返回
- 返回CGPoint对象,表示获得的字幕平移量
- 参见
- setCaptionTranslation
◆ getCompoundBoundingVertices:
获取复合字幕原始边框变换后的顶点位置
- 参数
-
- 返回
- 返回NSArray对象,里面的对象类型为NSValue,而实际包含的数据类型为CGPoint,包含四个顶点位置,依次分别对应原始边框的左上,左下,右下,右上顶点
◆ getFontFamily:
- (NSString *) getFontFamily: |
|
(NSInteger) |
captionIndex |
|
获取字幕字体的名字
- 参数
-
- 返回
- 返回字幕字体的名字
- 参见
- setFontFamily
◆ getOpacity
◆ getRotationZ
获取字幕旋转角度
- 返回
- 返回字幕旋转角度
- 参见
- setRotationZ
◆ getScaleX
◆ getScaleY
◆ getText:
- (NSString *) getText: |
|
(NSInteger) |
captionIndex |
|
获取字幕文本
- 参数
-
- 返回
- 返回字幕文本
- 参见
- setText
◆ getTextColor:
获取字幕的颜色值
- 参数
-
captionIndex | 想要获取文本颜色的字幕索引号 |
- 返回
- 返回NvsColor对象,表示文本的颜色值
- 参见
- setTextColor
◆ getWeight:
- (int) getWeight: |
|
(int) |
captionIndex |
|
获取字幕权重值
- 参数
-
- 返回
- 字幕权重值
- 参见
- setWeight: captionIndex:
◆ getZValue
◆ movePosition:
- (void) movePosition: |
|
(int64_t) |
offset |
|
改变字幕显示位置(入点和出点同时偏移offset值)
- 参数
-
- 参见
- changeInPoint
-
changeOutPoint
◆ 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 |
|
◆ setCaptionTranslation:
- (void) setCaptionTranslation: |
|
(CGPoint) |
translation |
|
◆ setFontFamily:family:
- (void) setFontFamily: |
|
(NSInteger) |
captionIndex |
family: |
|
(NSString *) |
family |
|
|
| |
设置字幕字体
- 参数
-
captionIndex | 想要设置字体的字幕索引号 |
family | 字体名称,若设为空字符串,则设为默认字体 |
- 参见
- getFontFamily
◆ setOpacity:
- (void) setOpacity: |
|
(float) |
opacity |
|
◆ 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
该类的文档由以下文件生成: