MeiCam SDK For iOS  3.10.0
NvsAnimatedSticker.h
Go to the documentation of this file.
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 29. 2021
11 // Author: NewAuto video team
12 //================================================================================
13 #pragma once
14 
15 #import "NvsFx.h"
16 #import <CoreGraphics/CGGeometry.h>
17 
35 
36 @property (readonly) BOOL hasAudio;
37 @property (readonly) BOOL isPanoramic;
38 @property (readonly) int64_t defaultDuration;
39 @property (readonly) NSString* animatedStickerPeriodAnimationPackageId;
40 @property (readonly) NSString* animatedStickerInAnimationPackageId;
41 @property (readonly) NSString* animatedStickerOutAnimationPackageId;
42 
52 - (NSString *)getAnimatedStickerPackageId;
53 
63 - (void)setScale:(float)scale;
64 
75 - (void)setSeperatedScaleX:(float)scaleX;
76 
86 - (void)setSeperatedScaleY:(float)scaleY;
87 
97 - (float)getScale;
98 
108 - (float)getSeperatedScaleX;
109 
119 - (float)getSeperatedScaleY;
120 
130 - (void)setHorizontalFlip:(bool)flip;
131 
141 - (BOOL)getHorizontalFlip;
142 
152 - (void)setVerticalFlip:(bool)flip;
153 
163 - (BOOL)getVerticalFlip;
164 
174 - (void)setRotationZ:(float)angle;
175 
186 - (float)getRotationZ;
187 
198 - (void)setTranslation:(CGPoint)translation;
199 
209 - (CGPoint)getTransltion;
210 
222 - (void)translateAnimatedSticker:(CGPoint)translationOffset;
223 
235 - (void)scaleAnimatedSticker:(float)scaleFactor anchor:(CGPoint)anchor;
236 
248 - (void)rotateAnimatedSticker:(float)angle anchor:(CGPoint)anchor;
249 
259 - (void)rotateAnimatedSticker:(float)angle;
260 
270 
280 - (NSArray *)getBoundingRectangleVertices;
281 
291 - (void)setCenterPolarAngle:(float)centerPolarAngle;
292 
302 - (float)getCenterPolarAngle;
303 
313 - (void)setCenterAzimuthAngle:(float)centerAzimuthAngle;
314 
324 - (float)getCenterAzimuthAngle;
325 
335 - (void)setPolarAngleRange:(float)polarAngleRange;
336 
346 - (float)getPolarAngleRange;
347 
357 - (float)getOrthoAngleRange;
358 
368 - (void)setZValue:(float)value;
369 
379 - (float)getZValue;
380 
393 - (void)setVolumeGain:(float)leftVolumeGain rightVolumeGain:(float)rightVolumeGain;
394 
408 - (void)getVolumeGain:(float *)leftVolumeGain rightVolumeGain:(float *)rightVolumeGain;
409 
420 - (void)setOpacity:(float)opacity;
421 
432 - (float)getOpacity;
433 
444 - (void)setCurrentKeyFrameTime:(int64_t)time;
445 
458 - (bool)setControlPoint:(NSString *)fxParam controlPointPair:(NvsControlPointPair *)controlPointPair;
459 
472 - (NvsControlPointPair*)getControlPoint:(NSString*)fxParam;
473 
488 -(bool) applyAnimatedStickerPeriodAnimation:(NSString*) animatedStickerPeriodAnimationPackageId;
489 
504 -(bool) applyAnimatedStickerInAnimation:(NSString*) animatedStickerInAnimationPackageId;
505 
520 -(bool) applyAnimatedStickerOutAnimation:(NSString*) animatedStickerOutAnimationPackageId;
521 
532 -(void) setAnimatedStickerAnimationPeriod:(int)periodInMS;
533 
545 
556 -(void) setAnimatedStickerInAnimationDuration:(int)inAnimationDurationInMS;
557 
569 
580 -(void) setAnimatedStickerOutAnimationDuration:(int)outAnimationDurationInMS;
581 
593 
604 -(void) enableSeparateProgressMode:(bool)enable;
605 
617 
618 @end
619 
-[NvsAnimatedSticker getSeperatedScaleY]
float getSeperatedScaleY()
Get the seperated vertical scale value of the animated sticker.
-[NvsAnimatedSticker getHorizontalFlip]
BOOL getHorizontalFlip()
Get the horizontal flip state of the animated sticker.
-[NvsAnimatedSticker isSeparateProgressModeEnabled]
bool isSeparateProgressModeEnabled()
Get whether enable the separate effect settings from progress mode.
NvsAnimatedSticker::defaultDuration
int64_t defaultDuration
The default duration of the animated sticker on the timeline (in microseconds).
Definition: NvsAnimatedSticker.h:38
-[NvsAnimatedSticker getBoundingRectangleVertices]
NSArray * getBoundingRectangleVertices()
Get the vertex positions of the animated sticker's original bounding in the timeline coordinate syste...
NvsControlPointPair
Key frame control point pair structure.
Definition: NvsControlPointPair.h:27
-[NvsAnimatedSticker getOpacity]
float getOpacity()
Get the sticker opacity.
NvsRect
Rectangle.
Definition: NvsCommonDef.h:292
-[NvsAnimatedSticker getAnimatedStickerAnimationPeriod]
int getAnimatedStickerAnimationPeriod()
Get animated sticker Animation Period.
NvsAnimatedSticker
animated sticker class.
Definition: NvsAnimatedSticker.h:35
-[NvsAnimatedSticker getOrthoAngleRange]
float getOrthoAngleRange()
Get the animated sticker’s field angle which is perpendicular to the polar angle. It is only valid fo...
NvsFx
effect class.
Definition: NvsFx.h:83
NvsAnimatedSticker::animatedStickerOutAnimationPackageId
NSString * animatedStickerOutAnimationPackageId
The package ID of the animated sticker out-animation style.
Definition: NvsAnimatedSticker.h:41
-[NvsAnimatedSticker getAnimatedStickerPackageId]
NSString * getAnimatedStickerPackageId()
Get animated sticker's package ID.
-[NvsAnimatedSticker getVerticalFlip]
BOOL getVerticalFlip()
Get the vertical flip state of the animated sticker.
NvsAnimatedSticker::hasAudio
BOOL hasAudio
Whether it contains audio.
Definition: NvsAnimatedSticker.h:36
-[NvsAnimatedSticker getAnimatedStickerInAnimationDuration]
int getAnimatedStickerInAnimationDuration()
Get animated sticker in-animation duration.
-[NvsAnimatedSticker getOriginalBoundingRect]
NvsRect getOriginalBoundingRect()
Get the original bounding of the animated sticker in the timeline coordinate system....
NvsAnimatedSticker::isPanoramic
BOOL isPanoramic
Whether It's a panorama animated sticker,Default is no.
Definition: NvsAnimatedSticker.h:37
-[NvsAnimatedSticker getCenterAzimuthAngle]
float getCenterAzimuthAngle()
Get the azimuth of the center point of the animated sticker. It is only valid for panorama animated s...
NvsAnimatedSticker::animatedStickerPeriodAnimationPackageId
NSString * animatedStickerPeriodAnimationPackageId
The package ID of the animated sticker loop-animation style.
Definition: NvsAnimatedSticker.h:39
-[NvsAnimatedSticker getPolarAngleRange]
float getPolarAngleRange()
Get animated sticker's field angle, which is coplanar with the polar angle. It is only valid for pano...
-[NvsAnimatedSticker getTransltion]
CGPoint getTransltion()
Get the translation position of the animated sticker in the timeline coordinate system.
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
-[NvsAnimatedSticker getRotationZ]
float getRotationZ()
Get the angle at which the animation sticker rotates clockwise along the Z-axis, which is perpendicul...
-[NvsAnimatedSticker getCenterPolarAngle]
float getCenterPolarAngle()
Get the polar angle of the center point of the animated sticker. It is only valid for panorama animat...
-[NvsAnimatedSticker getAnimatedStickerOutAnimationDuration]
int getAnimatedStickerOutAnimationDuration()
Get animated sticker out-animation duration.
NvsAnimatedSticker::animatedStickerInAnimationPackageId
NSString * animatedStickerInAnimationPackageId
The package ID of the animated sticker in-animation style.
Definition: NvsAnimatedSticker.h:40
NvsFx.h
-[NvsAnimatedSticker getZValue]
float getZValue()
Get the sticker Z value.
-[NvsAnimatedSticker getSeperatedScaleX]
float getSeperatedScaleX()
Get the seperated horizontal scale value of the animated sticker.
-[NvsAnimatedSticker getScale]
float getScale()
Get the scale value of the animated sticker.