MeiCam SDK For iOS  3.7.2
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 
74 - (float)getScale;
75 
85 - (void)setHorizontalFlip:(bool)flip;
86 
96 - (BOOL)getHorizontalFlip;
97 
107 - (void)setVerticalFlip:(bool)flip;
108 
118 - (BOOL)getVerticalFlip;
119 
129 - (void)setRotationZ:(float)angle;
130 
141 - (float)getRotationZ;
142 
153 - (void)setTranslation:(CGPoint)translation;
154 
164 - (CGPoint)getTransltion;
165 
177 - (void)translateAnimatedSticker:(CGPoint)translationOffset;
178 
190 - (void)scaleAnimatedSticker:(float)scaleFactor anchor:(CGPoint)anchor;
191 
203 - (void)rotateAnimatedSticker:(float)angle anchor:(CGPoint)anchor;
204 
214 - (void)rotateAnimatedSticker:(float)angle;
215 
225 
235 - (NSArray *)getBoundingRectangleVertices;
236 
246 - (void)setCenterPolarAngle:(float)centerPolarAngle;
247 
257 - (float)getCenterPolarAngle;
258 
268 - (void)setCenterAzimuthAngle:(float)centerAzimuthAngle;
269 
279 - (float)getCenterAzimuthAngle;
280 
290 - (void)setPolarAngleRange:(float)polarAngleRange;
291 
301 - (float)getPolarAngleRange;
302 
312 - (float)getOrthoAngleRange;
313 
323 - (void)setZValue:(float)value;
324 
334 - (float)getZValue;
335 
348 - (void)setVolumeGain:(float)leftVolumeGain rightVolumeGain:(float)rightVolumeGain;
349 
363 - (void)getVolumeGain:(float *)leftVolumeGain rightVolumeGain:(float *)rightVolumeGain;
364 
375 - (void)setOpacity:(float)opacity;
376 
387 - (float)getOpacity;
388 
399 - (void)setCurrentKeyFrameTime:(int64_t)time;
400 
413 - (bool)setControlPoint:(NSString *)fxParam controlPointPair:(NvsControlPointPair *)controlPointPair;
414 
427 - (NvsControlPointPair*)getControlPoint:(NSString*)fxParam;
428 
443 -(bool) applyAnimatedStickerPeriodAnimation:(NSString*) animatedStickerPeriodAnimationPackageId;
444 
459 -(bool) applyAnimatedStickerInAnimation:(NSString*) animatedStickerInAnimationPackageId;
460 
475 -(bool) applyAnimatedStickerOutAnimation:(NSString*) animatedStickerOutAnimationPackageId;
476 
487 -(void) setAnimatedStickerAnimationPeriod:(int)periodInMS;
488 
500 
511 -(void) setAnimatedStickerInAnimationDuration:(int)inAnimationDurationInMS;
512 
524 
535 -(void) setAnimatedStickerOutAnimationDuration:(int)outAnimationDurationInMS;
536 
548 
549 @end
550 
-[NvsAnimatedSticker getHorizontalFlip]
BOOL getHorizontalFlip()
Get the horizontal flip state of the animated sticker.
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:276
-[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 getScale]
float getScale()
Get the scale value of the animated sticker.