美摄SDK For iOS  3.7.2
NvsVideoEffectCompoundCaption.h
浏览该文件的文档.
1 //================================================================================
2 //
3 // (c) Copyright China Digital Video (Beijing) Limited, 2016. All rights reserved.
4 //
5 // This code and information is provided "as is" without warranty of any kind,
6 // either expressed or implied, including but not limited to the implied
7 // warranties of merchantability and/or fitness for a particular purpose.
8 //
9 //--------------------------------------------------------------------------------
10 // Birth Date: Jan 15. 2021
11 // Author: NewAuto video team
12 //================================================================================
13 #pragma once
14 
15 #import "NvsEffect.h"
16 #import <CoreGraphics/CGGeometry.h>
17 
43 typedef enum
44 {
51 
53 
62 @property (readonly) NSInteger captionCount;
63 
64 @property (readonly) int64_t inPoint;
65 @property (readonly) int64_t outPoint;
66 @property (readonly) NSString* captionStylePackageId;
67 
81 - (int64_t)changeInPoint:(int64_t)newInPoint;
82 
96 - (int64_t)changeOutPoint:(int64_t)newOutPoint;
97 
108 - (void)movePosition:(int64_t)offset;
109 
121 - (void)setText:(NSInteger)captionIndex
122  text:(NSString *)text;
123 
135 - (NSString *)getText:(NSInteger)captionIndex;
136 
148 - (void)setFontFamily:(NSInteger)captionIndex
149  family:(NSString *)family;
150 
162 - (NSString *)getFontFamily:(NSInteger)captionIndex;
163 
175 - (void)setTextColor:(NSInteger)captionIndex
176  textColor:(const NvsEffectColor *)textColor;
177 
189 - (NvsEffectColor)getTextColor:(NSInteger)captionIndex;
190 
202 - (void)setWeight:(int)weight captionIndex:(int)captionIndex;
203 
215 - (int)getWeight:(int)captionIndex;
216 
226 - (void)setCaptionTranslation:(CGPoint)translation;
227 
237 - (CGPoint)getCaptionTranslation;
238 
249 - (void)translateCaption:(CGPoint)translationOffset;
250 
260 - (void)setAnchorPoint:(CGPoint)anchor;
261 
271 - (CGPoint)getAnchorPoint;
272 
283 - (void)setScaleX:(float)scale;
284 
295 - (float)getScaleX;
296 
307 - (void)setScaleY:(float)scale;
308 
319 - (float)getScaleY;
320 
331 - (void)scaleCaption:(float)scaleFactor
332  anchor:(CGPoint)anchor;
333 
343 - (void)setRotationZ:(float)angle;
344 
354 - (float)getRotationZ;
355 
366 - (void)rotateCaption:(float)angle
367  anchor:(CGPoint)anchor;
368 
379 - (void)rotateCaptionAroundCenter:(float)angle
380  boundingType:(NvsEffectBoundingType)boundingType;
381 
394 - (NSArray *)getCaptionBoundingVertices:(NSInteger)captionIndex
395  boundingType:(NvsEffectBoundingType)boundingType;
396 
407 - (NSArray *)getCompoundBoundingVertices:(NvsEffectBoundingType)boundingType;
408 
417 - (void)setZValue:(float)value;
418 
427 - (float)getZValue;
428 
438 - (void)setOpacity:(float)opacity;
439 
449 - (float)getOpacity;
450 
460 - (void)setVideoResolution:(NvsEffectVideoResolution*)resolution;
461 
462 
463 @end
464 
NvsVideoEffectCompoundCaption::captionStylePackageId
NSString * captionStylePackageId
字幕样式包裹ID
Definition: NvsVideoEffectCompoundCaption.h:66
-[NvsVideoEffectCompoundCaption getAnchorPoint]
CGPoint getAnchorPoint()
获取字幕锚点
NvsVideoEffectCompoundCaption::captionCount
NSInteger captionCount
获取该复合字幕中子字幕的数量
Definition: NvsVideoEffectCompoundCaption.h:62
NvsEffectBoundingType
NvsEffectBoundingType
Definition: NvsVideoEffectCompoundCaption.h:44
NvsEffectBoundingType_Text_Frame
@ NvsEffectBoundingType_Text_Frame
文字框的边框
Definition: NvsVideoEffectCompoundCaption.h:46
NvsEffectBoundingType_Typographic_Text
@ NvsEffectBoundingType_Typographic_Text
文字的排版边框
Definition: NvsVideoEffectCompoundCaption.h:49
-[NvsVideoEffectCompoundCaption getOpacity]
float getOpacity()
获取字幕透明度
-[NvsVideoEffectCompoundCaption getZValue]
float getZValue()
获取字幕Z值
-[NvsVideoEffectCompoundCaption getScaleX]
float getScaleX()
获取字幕水平缩放系数
NvsEffectColor
自定义颜色类
Definition: NvsEffectCommonDef.h:55
-[NvsVideoEffectCompoundCaption getRotationZ]
float getRotationZ()
获取字幕旋转角度
NvsVideoEffectCompoundCaption::inPoint
int64_t inPoint
字幕显示的入点(单位微秒)
Definition: NvsVideoEffectCompoundCaption.h:64
-[NvsVideoEffectCompoundCaption getScaleY]
float getScaleY()
获取字幕垂直缩放系数
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
NvsEffect
特效
Definition: NvsEffect.h:46
NvsVideoEffectCompoundCaption
Definition: NvsVideoEffectCompoundCaption.h:53
NvsEffectVideoResolution
视频解析度
Definition: NvsEffectCommonDef.h:39
NvsEffectBoundingType_Text
@ NvsEffectBoundingType_Text
文字的实际边框
Definition: NvsVideoEffectCompoundCaption.h:45
NvsVideoEffectCompoundCaption::outPoint
int64_t outPoint
字幕显示的出点(单位微秒)
Definition: NvsVideoEffectCompoundCaption.h:65
-[NvsVideoEffectCompoundCaption getCaptionTranslation]
CGPoint getCaptionTranslation()
获取字幕的平移量
NvsEffectBoundingType_Text_Origin_Frame
@ NvsEffectBoundingType_Text_Origin_Frame
没有经过变换的文字框的边框
Definition: NvsVideoEffectCompoundCaption.h:48
NvsEffect.h
NvsEffectBoundingType_Frame
@ NvsEffectBoundingType_Frame
包括装饰在内的整体边框
Definition: NvsVideoEffectCompoundCaption.h:47