美摄SDK For iOS  3.7.2
NvsCompoundCaption.h
浏览该文件的文档.
1 #pragma once
2 
3 #import "NvsFx.h"
4 #import <CoreGraphics/CGGeometry.h>
5 
31 typedef enum
32 {
39 
41 
42 @property (readonly) NSString* captionStylePackageId;
43 
52 @property (readonly) NSInteger captionCount;
53 
65 - (void)setText:(NSInteger)captionIndex
66  text:(NSString *)text;
67 
79 - (NSString *)getText:(NSInteger)captionIndex;
80 
92 - (void)setFontFamily:(NSInteger)captionIndex
93  family:(NSString *)family;
94 
106 - (NSString *)getFontFamily:(NSInteger)captionIndex;
107 
119 - (void)setTextColor:(NSInteger)captionIndex
120  textColor:(const NvsColor *)textColor;
121 
133 - (NvsColor)getTextColor:(NSInteger)captionIndex;
134 
144 - (void)setCaptionTranslation:(CGPoint)translation;
145 
155 - (CGPoint)getCaptionTranslation;
156 
167 - (void)translateCaption:(CGPoint)translationOffset;
168 
178 - (void)setAnchorPoint:(CGPoint)anchor;
179 
189 - (CGPoint)getAnchorPoint;
190 
201 - (void)setScaleX:(float)scale;
202 
213 - (float)getScaleX;
214 
225 - (void)setScaleY:(float)scale;
226 
237 - (float)getScaleY;
238 
249 - (void)scaleCaption:(float)scaleFactor
250  anchor:(CGPoint)anchor;
251 
261 - (void)setRotationZ:(float)angle;
262 
272 - (float)getRotationZ;
273 
284 - (void)rotateCaption:(float)angle
285  anchor:(CGPoint)anchor;
286 
297 - (void)rotateCaptionAroundCenter:(float)angle
298  boundingType:(NvsBoundingType)boundingType;
299 
312 - (NSArray *)getCaptionBoundingVertices:(NSInteger)captionIndex
313  boundingType:(NvsBoundingType)boundingType;
314 
325 - (NSArray *)getCompoundBoundingVertices:(NvsBoundingType)boundingType;
326 
335 - (void)setZValue:(float)value;
336 
345 - (float)getZValue;
346 
356 - (void)setOpacity:(float)opacity;
357 
367 - (float)getOpacity;
368 
381 - (void)setDrawOutline:(BOOL)drawOutline captionIndex:(int)captionIndex;
382 
395 - (BOOL)getDrawOutline:(int)captionIndex;
396 
409 - (void)setOutlineColor:(NvsColor)outlineColor captionIndex:(int)captionIndex;
410 
423 -(NvsColor)getOutlineColor:(int)captionIndex;
424 
437 - (void)setOutlineWidth:(float)outlineWidth captionIndex:(int)captionIndex;
438 
451 - (float)getOutlineWidth:(int)captionIndex;
452 
465 - (void)setBackgroundColor:(NvsColor)backgroundColor captionIndex:(int)captionIndex;
466 
479 - (NvsColor)getBackgroundColor:(int)captionIndex;
480 
492 - (void)setBold:(BOOL)bold captionIndex:(int)captionIndex;
493 
505 - (BOOL)getBold:(int)captionIndex;
506 
518 - (void)setWeight:(int)weight captionIndex:(int)captionIndex;
519 
531 - (int)getWeight:(int)captionIndex;
532 
543 - (void)setItalic:(BOOL)italic captionIndex:(int)captionIndex;
544 
555 - (BOOL)getItalic:(int)captionIndex;
556 
565 - (void)setCurrentKeyFrameTime:(int64_t)time;
566 
579 - (bool)setControlPoint:(NSString *)fxParam controlPointPair:(NvsControlPointPair *)controlPointPair;
580 
593 - (NvsControlPointPair*)getControlPoint:(NSString*)fxParam;
594 
607 - (bool)removeKeyframeAtTime:(NSString *)fxParam time:(int64_t)time;
608 
619 - (bool)removeAllKeyframe:(NSString *)fxParam;
620 
631 - (bool)hasKeyframeList:(NSString *)fxParam;
632 
647 - (int64_t)findKeyframeTime:(NSString *)fxParam time:(int64_t)time flags:(int)flags;
648 
650 //
651 // Panoramic caption specific methods
652 //
653 @property (readonly) BOOL isPanoramic;
654 
664 -(void)setCenterPolarAngle:(float)centerPolarAngle;
665 
677 -(float)getCenterPolarAngle:(int)captionIndex;
678 
688 -(void)setPolarAngleRange:(float)polarAngleRange;
689 
701 -(float)getPolarAngleRange:(int)captionIndex;
702 
712 -(void)setCenterAzimuthAngle:(float)centerAzimuthAngle;
713 
725 -(float)getCenterAzimuthAngle:(int)captionIndex;
726 
738 -(float)getOrthoAngleRange:(int)captionIndex;
739 
749 -(void)setPanoramicScaleX:(float)scaleX;
750 
760 -(float)getPanoramicScaleX;
761 
771 -(void)setPanoramicScaleY:(float)scaleY;
772 
782 -(float)getPanoramicScaleY;
783 
793 -(void)setPanoramicRotation:(float)rotationAngle;
794 
804 -(float)getPanoramicRotation;
808 @end
NvsBoundingType_Text
@ NvsBoundingType_Text
文字的实际边框
Definition: NvsCompoundCaption.h:33
NvsCompoundCaption::captionCount
NSInteger captionCount
获取该复合字幕中子字幕的数量
Definition: NvsCompoundCaption.h:52
NvsControlPointPair
关键帧控制点对类。
Definition: NvsControlPointPair.h:27
NvsBoundingType_Text_Origin_Frame
@ NvsBoundingType_Text_Origin_Frame
没有经过变换的文字框的边框
Definition: NvsCompoundCaption.h:36
-[NvsCompoundCaption getAnchorPoint]
CGPoint getAnchorPoint()
获取字幕锚点
-[NvsCompoundCaption getOpacity]
float getOpacity()
获取字幕透明度
NvsCompoundCaption::captionStylePackageId
NSString * captionStylePackageId
字幕样式包裹ID
Definition: NvsCompoundCaption.h:42
-[NvsCompoundCaption getRotationZ]
float getRotationZ()
获取字幕旋转角度
-[NvsCompoundCaption getCaptionTranslation]
CGPoint getCaptionTranslation()
获取字幕的平移量
NvsBoundingType
NvsBoundingType
Definition: NvsCompoundCaption.h:32
NvsBoundingType_Frame
@ NvsBoundingType_Frame
包括装饰在内的整体边框
Definition: NvsCompoundCaption.h:35
NvsFx
特效类
Definition: NvsFx.h:83
-[NvsCompoundCaption getZValue]
float getZValue()
获取字幕Z值
-[NvsCompoundCaption getScaleY]
float getScaleY()
获取字幕垂直缩放系数
NvsColor
自定义颜色类
Definition: NvsCommonDef.h:318
NvsCompoundCaption
Definition: NvsCompoundCaption.h:41
NvsBoundingType_Typographic_Text
@ NvsBoundingType_Typographic_Text
文字的排版边框
Definition: NvsCompoundCaption.h:37
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
-[NvsCompoundCaption getScaleX]
float getScaleX()
获取字幕水平缩放系数
NvsBoundingType_Text_Frame
@ NvsBoundingType_Text_Frame
文字框的边框
Definition: NvsCompoundCaption.h:34
NvsFx.h