MeiCam SDK For iOS  3.14.0
NvsCompoundCaption.h
Go to the documentation of this file.
1 //================================================================================
2 //
3 // (c) Copyright Meishe Co. Ltd, 2018. 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: Dec 18. 2020
11 // Author: Meishe video team
12 //================================================================================
13 #pragma once
14 
15 #import "NvsFx.h"
16 #import <CoreGraphics/CGGeometry.h>
17 
43 typedef enum
44 {
51 
53 
54 @property (readonly) NSString* captionStylePackageId;
55 
64 @property (readonly) NSInteger captionCount;
65 
77 - (void)setText:(NSInteger)captionIndex
78  text:(NSString *)text;
79 
91 - (NSString *)getText:(NSInteger)captionIndex;
92 
104 - (void)setFontFamily:(NSInteger)captionIndex
105  family:(NSString *)family;
106 
118 - (NSString *)getFontFamily:(NSInteger)captionIndex;
119 
131 - (void)setTextColor:(NSInteger)captionIndex
132  textColor:(const NvsColor *)textColor;
133 
145 - (NvsColor)getTextColor:(NSInteger)captionIndex;
146 
156 - (void)setCaptionTranslation:(CGPoint)translation;
157 
167 - (CGPoint)getCaptionTranslation;
168 
179 - (void)translateCaption:(CGPoint)translationOffset;
180 
190 - (void)setAnchorPoint:(CGPoint)anchor;
191 
201 - (CGPoint)getAnchorPoint;
202 
213 - (void)setScaleX:(float)scale;
214 
225 - (float)getScaleX;
226 
237 - (void)setScaleY:(float)scale;
238 
249 - (float)getScaleY;
250 
261 - (void)scaleCaption:(float)scaleFactor
262  anchor:(CGPoint)anchor;
263 
273 - (void)setRotationZ:(float)angle;
274 
284 - (float)getRotationZ;
285 
296 - (void)rotateCaption:(float)angle
297  anchor:(CGPoint)anchor;
298 
309 - (void)rotateCaptionAroundCenter:(float)angle
310  boundingType:(NvsBoundingType)boundingType;
311 
324 - (NSArray *)getCaptionBoundingVertices:(NSInteger)captionIndex
325  boundingType:(NvsBoundingType)boundingType;
326 
337 - (NSArray *)getCompoundBoundingVertices:(NvsBoundingType)boundingType;
338 
347 - (void)setZValue:(float)value;
348 
357 - (float)getZValue;
358 
368 - (void)setOpacity:(float)opacity;
369 
379 - (float)getOpacity;
380 
393 - (void)setDrawOutline:(BOOL)drawOutline captionIndex:(int)captionIndex;
394 
407 - (BOOL)getDrawOutline:(int)captionIndex;
408 
421 - (void)setOutlineColor:(NvsColor)outlineColor captionIndex:(int)captionIndex;
422 
435 -(NvsColor)getOutlineColor:(int)captionIndex;
436 
449 - (void)setOutlineWidth:(float)outlineWidth captionIndex:(int)captionIndex;
450 
463 - (float)getOutlineWidth:(int)captionIndex;
464 
477 - (void)setBackgroundColor:(NvsColor)backgroundColor captionIndex:(int)captionIndex;
478 
491 - (NvsColor)getBackgroundColor:(int)captionIndex;
492 
504 - (void)setBold:(BOOL)bold captionIndex:(int)captionIndex;
505 
517 - (BOOL)getBold:(int)captionIndex;
518 
530 - (void)setWeight:(int)weight captionIndex:(int)captionIndex;
531 
543 - (int)getWeight:(int)captionIndex;
544 
555 - (void)setItalic:(BOOL)italic captionIndex:(int)captionIndex;
556 
567 - (BOOL)getItalic:(int)captionIndex;
568 
577 - (void)setCurrentKeyFrameTime:(int64_t)time;
578 
591 - (bool)setControlPoint:(NSString *)fxParam controlPointPair:(NvsControlPointPair *)controlPointPair;
592 
605 - (NvsControlPointPair*)getControlPoint:(NSString*)fxParam;
606 
619 - (bool)removeKeyframeAtTime:(NSString *)fxParam time:(int64_t)time;
620 
631 - (bool)removeAllKeyframe:(NSString *)fxParam;
632 
643 - (bool)hasKeyframeList:(NSString *)fxParam;
644 
659 - (int64_t)findKeyframeTime:(NSString *)fxParam time:(int64_t)time flags:(int)flags;
660 
662 //
663 // Panoramic caption specific methods
664 //
665 @property (readonly) BOOL isPanoramic;
666 
676 -(void)setCenterPolarAngle:(float)centerPolarAngle;
677 
689 -(float)getCenterPolarAngle:(int)captionIndex;
690 
700 -(void)setPolarAngleRange:(float)polarAngleRange;
701 
713 -(float)getPolarAngleRange:(int)captionIndex;
714 
724 -(void)setCenterAzimuthAngle:(float)centerAzimuthAngle;
725 
737 -(float)getCenterAzimuthAngle:(int)captionIndex;
738 
750 -(float)getOrthoAngleRange:(int)captionIndex;
751 
761 -(void)setPanoramicScaleX:(float)scaleX;
762 
772 -(float)getPanoramicScaleX;
773 
783 -(void)setPanoramicScaleY:(float)scaleY;
784 
794 -(float)getPanoramicScaleY;
795 
805 -(void)setPanoramicRotation:(float)rotationAngle;
806 
816 -(float)getPanoramicRotation;
817 
829 - (BOOL)isFrameCaption:(unsigned int)captionIndex;
833 @end
NvsBoundingType_Text
@ NvsBoundingType_Text
The actual text bounding.
Definition: NvsCompoundCaption.h:45
NvsCompoundCaption::captionCount
NSInteger captionCount
Gets number of sub-cpations in this compound caption.
Definition: NvsCompoundCaption.h:64
NvsControlPointPair
Key frame control point pair structure.
Definition: NvsControlPointPair.h:27
NvsBoundingType_Text_Origin_Frame
@ NvsBoundingType_Text_Origin_Frame
Text frame bounding that has not been transformed.
Definition: NvsCompoundCaption.h:48
-[NvsCompoundCaption getAnchorPoint]
CGPoint getAnchorPoint()
Gets caption anchor.
-[NvsCompoundCaption getOpacity]
float getOpacity()
Get the caption opacity.
NvsCompoundCaption::captionStylePackageId
NSString * captionStylePackageId
The package ID of the caption style.
Definition: NvsCompoundCaption.h:54
-[NvsCompoundCaption getRotationZ]
float getRotationZ()
Gets caption rotation angle.
-[NvsCompoundCaption getCaptionTranslation]
CGPoint getCaptionTranslation()
Gets the amount of caption translation.
NvsBoundingType
NvsBoundingType
Definition: NvsCompoundCaption.h:44
NvsBoundingType_Frame
@ NvsBoundingType_Frame
The whole bounding including decoration.
Definition: NvsCompoundCaption.h:47
NvsFx
effect class.
Definition: NvsFx.h:83
-[NvsCompoundCaption getZValue]
float getZValue()
Gets caption Z value.
-[NvsCompoundCaption getScaleY]
float getScaleY()
Gets caption vertical scaling factor.
NvsColor
Self-defined color.
Definition: NvsCommonDef.h:403
NvsCompoundCaption
Definition: NvsCompoundCaption.h:53
NvsBoundingType_Typographic_Text
@ NvsBoundingType_Typographic_Text
The typographic text bounding.
Definition: NvsCompoundCaption.h:49
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
-[NvsCompoundCaption getScaleX]
float getScaleX()
Gets caption horizontal scaling factor.
NvsBoundingType_Text_Frame
@ NvsBoundingType_Text_Frame
Text frame bounding.
Definition: NvsCompoundCaption.h:46
NvsFx.h