| 
    美摄SDK For iOS
    3.7.2
    
   | 
 
动画贴纸类 更多...
#import <NvsAnimatedSticker.h>
  
属性 | |
| BOOL | hasAudio | 
| 是否含有音频  更多... | |
| BOOL | isPanoramic | 
| 是否为全景图动画贴纸,默认为否  更多... | |
| int64_t | defaultDuration | 
| 动画贴纸在时间线上的默认长度(单位微秒)  更多... | |
| NSString * | animatedStickerPeriodAnimationPackageId | 
| 动画贴纸循环动画样式包裹ID  更多... | |
| NSString * | animatedStickerInAnimationPackageId | 
| 动画贴纸入动画样式包裹ID  更多... | |
| NSString * | animatedStickerOutAnimationPackageId | 
| 动画贴纸出动画样式包裹ID  更多... | |
  属性 继承自 NvsFx | |
| NvsFxDescription * | description | 
| 特效描述  更多... | |
动画贴纸类
动画贴纸是视频编辑时使用的一种美化特效,可以产生动画效果。 用户可以在时间线(或者轨道,或者采集)上添加和移除动画贴纸,也可以通过各种API调整贴纸的各种属性,如位置、大小、显示时间等等。 
注:动画贴纸在时间线(或者轨道,或者采集)上的入点和出点单位都为微秒 
| - (bool) applyAnimatedStickerInAnimation: | (NSString *) | animatedStickerInAnimationPackageId | 
运用动画贴纸入动画样式包。注意:如果已经应用了循环动画样式包,需要先把循环动画设置为null,否则不生效
| animatedStickerInAnimationPackageId | 动画贴纸入动画样式资源包ID | 
| - (bool) applyAnimatedStickerOutAnimation: | (NSString *) | animatedStickerOutAnimationPackageId | 
运用动画贴纸出动画样式包. 注意:如果已经应用了循环动画样式包,需要先把循环动画设置为null,否则不生效
| animatedStickerOutAnimationPackageId | 动画贴纸出动画样式资源包ID | 
| - (bool) applyAnimatedStickerPeriodAnimation: | (NSString *) | animatedStickerPeriodAnimationPackageId | 
运用动画贴纸循环动画样式包
| animatedStickerPeriodAnimationPackageId | 动画贴纸循环动画样式资源包ID | 
| - (int) getAnimatedStickerAnimationPeriod | 
获取动画贴纸循环动画的周期
| - (int) getAnimatedStickerInAnimationDuration | 
获取动画贴纸入动画的时长
| - (int) getAnimatedStickerOutAnimationDuration | 
获取动画贴纸出动画的时长
| - (NSString *) getAnimatedStickerPackageId | 
获取动画贴纸包ID
| - (NSArray *) getBoundingRectangleVertices | 
| - (float) getCenterAzimuthAngle | 
获取动画贴纸中心点的方位角。只对全景图动画贴纸有效
| - (float) getCenterPolarAngle | 
获取动画贴纸中心点的极角。只对全景图动画贴纸有效
| - (NvsControlPointPair*) getControlPoint: | (NSString *) | fxParam | 
返回关键帧控制点对
| fxParam | 贴纸参数的类型 | 
| - (BOOL) getHorizontalFlip | 
| - (float) getOpacity | 
| - (float) getOrthoAngleRange | 
获取动画贴纸与极角垂直的张角。只对全景图动画贴纸有效
| - (float) getPolarAngleRange | 
获取动画贴纸极角的张角。只对全景图动画贴纸有效
| - (float) getRotationZ | 
| - (float) getScale | 
| - (CGPoint) getTransltion | 
| - (BOOL) getVerticalFlip | 
| - (void) getVolumeGain: | (float *) | leftVolumeGain | |
| rightVolumeGain: | (float *) | rightVolumeGain | |
获取音量
| leftVolumeGain | 输出左声道音量值 | 
| rightVolumeGain | 输出右声道音量值 | 
| - (float) getZValue | 
获取贴纸Z值
| - (void) rotateAnimatedSticker: | (float) | angle | 
以动画贴纸中心点为锚点旋转动画贴纸,该函数设置的旋转角度可叠加
| angle | 旋转角度 | 
| - (void) rotateAnimatedSticker: | (float) | angle | |
| anchor: | (CGPoint) | anchor | |
以锚点为中心旋转动画贴纸,该函数设置的旋转角度可叠加
| angle | 旋转角度 | 
| anchor | 锚点 | 
| - (void) scaleAnimatedSticker: | (float) | scaleFactor | |
| anchor: | (CGPoint) | anchor | |
以锚点为中心缩放动画贴纸,该函数设置的缩放值可叠加
| scaleFactor | 动画贴纸缩放系数 | 
| anchor | 动画贴纸缩放的锚点 | 
| - (void) setAnimatedStickerAnimationPeriod: | (int) | periodInMS | 
| - (void) setAnimatedStickerInAnimationDuration: | (int) | inAnimationDurationInMS | 
设置动画贴纸入动画的时长
| inAnimationDurationInMS | 入动画的时长,注意:单位是毫秒 | 
| - (void) setAnimatedStickerOutAnimationDuration: | (int) | outAnimationDurationInMS | 
设置动画贴纸出动画的时长
| outAnimationDurationInMS | 出动画的时长,注意:单位是毫秒 | 
| - (void) setCenterAzimuthAngle: | (float) | centerAzimuthAngle | 
对动画贴纸设置中心点的方位角。只对全景图动画贴纸有效
| centerAzimuthAngle | 中心点的极角,单位为角度 | 
| - (void) setCenterPolarAngle: | (float) | centerPolarAngle | 
对动画贴纸设置中心点的极角。只对全景图动画贴纸有效
| centerPolarAngle | 中心点的极角,单位为角度 | 
| - (bool) setControlPoint: | (NSString *) | fxParam | |
| controlPointPair: | (NvsControlPointPair *) | controlPointPair | |
设置贴纸的关键帧控制点对
| fxParam | 贴纸参数的类型 | 
| controlPointPair | 控制点对,设置控制点为{0, 0},即当前控制点为线性插值方式,否则为曲线插值方式 | 
| - (void) setCurrentKeyFrameTime: | (int64_t) | time | 
设置贴纸的关键帧时间
| time | 时间点 | 
| - (void) setHorizontalFlip: | (bool) | flip | 
| - (void) setOpacity: | (float) | opacity | 
| - (void) setPolarAngleRange: | (float) | polarAngleRange | 
对动画贴纸设置极角的张角。只对全景图动画贴纸有效
| polarAngleRange | 极角的张角,单位为角度 | 
| - (void) setRotationZ: | (float) | angle | 
| - (void) setScale: | (float) | scale | 
| - (void) setTranslation: | (CGPoint) | translation | 
设置动画贴纸在时间线坐标系下的平移坐标,该函数设置的平移坐标不叠加。请参见时间线与视图坐标
| translation | 平移坐标 | 
| - (void) setVerticalFlip: | (bool) | flip | 
| - (void) setVolumeGain: | (float) | leftVolumeGain | |
| rightVolumeGain: | (float) | rightVolumeGain | |
设置贴纸音量
| leftVolumeGain | 左声道音量增益,取值范围[0,1] | 
| rightVolumeGain | 右声道音量增益,取值范围[0,1] | 
| - (void) setZValue: | (float) | value | 
设置贴纸Z值。Z值越大,贴纸越处于上层
| value | Z值 | 
| - (void) translateAnimatedSticker: | (CGPoint) | translationOffset | 
在时间线坐标系下平移动画贴纸,该函数设置的平移坐标可叠加
| translationOffset | 动画贴纸平移的偏移值 | 
      
  | 
  readatomicassign | 
动画贴纸入动画样式包裹ID
      
  | 
  readatomicassign | 
动画贴纸出动画样式包裹ID
      
  | 
  readatomicassign | 
动画贴纸循环动画样式包裹ID
      
  | 
  readatomicassign | 
动画贴纸在时间线上的默认长度(单位微秒)
      
  | 
  readatomicassign | 
是否含有音频
      
  | 
  readatomicassign | 
是否为全景图动画贴纸,默认为否
 1.8.18