Package com.shixing.sxedit
Class SXEffect
- java.lang.Object
-
- com.shixing.sxedit.SXEffect
-
- Direct Known Subclasses:
SXAnimationEffect
,SXFilterEffect
,SXGenericEffect
,SXTextAnimationEffect
,SXTrackAnimationEffect
,SXVideoEffect
public abstract class SXEffect extends java.lang.Object
特效基类
-
-
Constructor Summary
Constructors Constructor Description SXEffect(long nativeEffect, long nativeManager, java.lang.String trackID)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
double
getDuration()
效果的持续时长,时间跟随方式为 FollowWholeProcess 时无效double
getDurationOfOneCycle()
获取一次循环的时长,时长由倍速转化,因此未设置动画资源时返回值为0SXEffectTimeFollowType
getEffectFollowType()
获取效果跟随轨道时间方式java.lang.String
getEffectId()
获取特效 IdSXEffectTimeExtendType
getExtendType()
获取特效的时间扩展方式long
getNativeEffect()
float
getSpeed()
获取特效倍速double
getStartTime()
获取特效开始时间abstract SXEffectType
getType()
获取特效类型void
setDuration(double duration)
设置时长void
setDurationOfOneCycle(double duration)
设置一次循环的时长,时长会转化为倍速,因此未设置动画资源时此设置无效void
setEffectExtendType(SXEffectTimeExtendType type)
设置效果在显示时间区间内的扩展方式void
setEffectFollowType(SXEffectTimeFollowType type)
设置此效果是跟随轨道时间方式,默认为跟随轨道开始显示时间即SXEffectTimeFollowType.FollowDisplayTime
void
setSpeed(float speed)
设置特效倍速,默认为1倍速void
setStartTime(double startTime)
设置开始时间
-
-
-
Method Detail
-
getEffectId
public java.lang.String getEffectId()
获取特效 Id- Returns:
- 特效 id
-
getType
public abstract SXEffectType getType()
获取特效类型- Returns:
SXEffectType
-
getStartTime
public double getStartTime()
获取特效开始时间不同时间跟随方式start time的参照时间是不一样的,跟随方式祥见
SXEffectTimeFollowType
类型说明- Returns:
- 秒
-
setStartTime
public void setStartTime(double startTime)
设置开始时间不同时间跟随方式start time的参照时间是不一样的,跟随方式祥见
SXEffectTimeFollowType
类型说明- Parameters:
startTime
-
-
getDuration
public double getDuration()
效果的持续时长,时间跟随方式为 FollowWholeProcess 时无效- Returns:
- 时长,单位为秒
-
setDuration
public void setDuration(double duration)
设置时长时间跟随方式为
SXEffectTimeFollowType.FollowWholeProcess
时无效- Parameters:
duration
- 秒
-
setSpeed
public void setSpeed(float speed)
设置特效倍速,默认为1倍速1. 仅扩展方式为
SXEffectTimeExtendType.StretchAndLoop
时有效- Parameters:
speed
- 倍速
-
getSpeed
public float getSpeed()
获取特效倍速- Returns:
- 特效倍速
-
getDurationOfOneCycle
public double getDurationOfOneCycle()
获取一次循环的时长,时长由倍速转化,因此未设置动画资源时返回值为01. 仅扩展方式为kStretchAndLoop时有效
- Returns:
- 一次循环的时长
-
setDurationOfOneCycle
public void setDurationOfOneCycle(double duration)
设置一次循环的时长,时长会转化为倍速,因此未设置动画资源时此设置无效1. 仅扩展方式为kStretchAndLoop时有效
- Parameters:
duration
- 一次循环的时长
-
setEffectFollowType
public void setEffectFollowType(SXEffectTimeFollowType type)
设置此效果是跟随轨道时间方式,默认为跟随轨道开始显示时间即SXEffectTimeFollowType.FollowDisplayTime
- Parameters:
type
- 跟随轨道时间方式
-
getEffectFollowType
public SXEffectTimeFollowType getEffectFollowType()
获取效果跟随轨道时间方式1. 例如跟随轨道开始时间与轨道一同开始、跟随轨道的结束时间与轨道一同结束等, 默认跟随方式为
SXEffectTimeFollowType.FollowDisplayTime
- Returns:
- 跟随轨道时间方式
-
setEffectExtendType
public void setEffectExtendType(SXEffectTimeExtendType type)
设置效果在显示时间区间内的扩展方式1. 扩展方式决定当特效时间超出特效自身的时长时如何扩展 2. 默认扩展方式为
SXEffectTimeExtendType.Stretch
- Parameters:
type
- 扩展类型
-
getExtendType
public SXEffectTimeExtendType getExtendType()
获取特效的时间扩展方式- Returns:
- 扩展方式
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getNativeEffect
public long getNativeEffect()
-
-