public interface AliyunPasterManager
setDisplaySize(int, int)
设置动图显示区域的大小,这个显示区域指的是
UI界面上的显示区域。Modifier and Type | Method and Description |
---|---|
AliyunPasterControllerCompoundCaption |
addCaptionWithStartTime(java.lang.String text,
Source bubbleEffectSource,
Source fontSource,
long startTimeInUs,
long durationInUs)
添加文字
v3.23.0 新增
|
AliyunPasterControllerCompoundCaption |
addCaptionWithStartTime(java.lang.String text,
Source bubbleEffectSource,
Source fontSource,
long startTime,
long duration,
java.util.concurrent.TimeUnit timeUnit)
添加文字
v3.23.0 新增
|
AliyunPasterControllerCompoundCaption |
addCaptionWithStartTime(java.lang.String text,
java.lang.String bubbleEffectPath,
java.lang.String font,
long startTimeInUs,
long durationInUs)
Deprecated.
|
AliyunPasterControllerImage |
addImage(Source source)
添加图片
|
AliyunPasterController |
addPaster(Source source)
添加贴图
|
AliyunPasterController |
addPaster(java.lang.String path)
Deprecated.
使用
addPaster(Source) 替代 |
AliyunPasterController |
addPasterWithStartTime(Source source,
long startTimeInUs,
long durationInUs)
添加贴图,并传入贴图渲染时间
|
AliyunPasterController |
addPasterWithStartTime(Source source,
long startTime,
long duration,
java.util.concurrent.TimeUnit timeUnit)
添加贴图,并传入贴图渲染时间
|
AliyunPasterController |
addPasterWithStartTime(java.lang.String path,
long startTimeInUs,
long durationInUs)
Deprecated.
|
AliyunPasterController |
addSubtitle(java.lang.String text,
Source font)
Deprecated.
|
AliyunPasterController |
addSubtitle(java.lang.String text,
java.lang.String font)
Deprecated.
|
AliyunPasterController |
addSubtitleWithStartTime(java.lang.String text,
Source font,
long startTimeInUs,
long durationInUs)
Deprecated.
|
AliyunPasterController |
addSubtitleWithStartTime(java.lang.String text,
java.lang.String font,
long startTimeInUs,
long durationInUs)
Deprecated.
|
AliyunIPasterController |
findControllerAtPoint(PointF point,
long timeInUs)
查找贴图控制器
v3.22.0 新增
|
AliyunIPasterController |
findControllerAtPoint(PointF point,
long time,
java.util.concurrent.TimeUnit timeUnit)
查找贴图控制器
|
java.util.List<AliyunIPasterController> |
findControllersByType(int type)
通过类型查找控制器
|
void |
remove(AliyunIPasterController aController)
delete paster controller
|
void |
setDisplaySize(int width,
int height)
设置贴图展示区域的大小,该设置影响贴图在视频中的位置和大小,
贴图在视频中的大小为贴图的展示大小与展示区域大小的比例换算到视频区域中,位置的计算同理
该接口必须在
AliyunIEditor.init(SurfaceView, Context) 之前调用 |
void |
setOnPasterRestoreListener(OnPasterRestored listener)
设置恢复贴纸的回调,主要用于恢复贴图上层UI 总称:paster
该接口必须在
AliyunIEditor.init(SurfaceView, Context) 之前调用,否则会造成贴图、字幕、涂鸦等效果无法恢复的问题 |
@Deprecated AliyunPasterController addPaster(java.lang.String path)
addPaster(Source)
替代path
- 贴图路径AliyunPasterController addPaster(Source source)
path
- 贴图路径@Deprecated AliyunPasterController addPasterWithStartTime(java.lang.String path, long startTimeInUs, long durationInUs)
addPasterWithStartTime(Source, long, long)
替代path
- 贴图路径startTimeInUs
- 贴图开始时间, 单位:微秒durationInUs
- 贴图持续时长, 单位:微秒AliyunPasterController addPasterWithStartTime(Source source, long startTimeInUs, long durationInUs)
source
- 贴图资源startTimeInUs
- 贴图开始时间, 单位:微秒durationInUs
- 贴图持续时长, 单位:微秒AliyunPasterController addPasterWithStartTime(Source source, long startTime, long duration, java.util.concurrent.TimeUnit timeUnit)
source
- 贴图资源startTime
- 贴图开始时间duration
- 贴图持续时长timeUnit
- 时间单位@Deprecated AliyunPasterController addSubtitle(java.lang.String text, java.lang.String font)
text
- 文字font
- 文字字体资源@Deprecated AliyunPasterController addSubtitle(java.lang.String text, Source font)
text
- 文字font
- 文字字体@Deprecated AliyunPasterController addSubtitleWithStartTime(java.lang.String text, java.lang.String font, long startTimeInUs, long durationInUs)
addSubtitleWithStartTime(String, Source, long, long)
替代text
- 显示的文字font
- 文字字体startTimeInUs
- 开始时间, 单位:微秒durationInUs
- 时长, 单位:微秒@Deprecated AliyunPasterController addSubtitleWithStartTime(java.lang.String text, Source font, long startTimeInUs, long durationInUs)
text
- 显示的文字font
- 文字字体startTimeInUs
- 开始时间, 单位:微秒durationInUs
- 时长, 单位:微秒@Deprecated AliyunPasterControllerCompoundCaption addCaptionWithStartTime(java.lang.String text, java.lang.String bubbleEffectPath, java.lang.String font, long startTimeInUs, long durationInUs)
addCaptionWithStartTime(String,Source,Source,long,long)
替代text
- 显示的文字bubbleEffectPath
- 气泡资源地址font
- 文字字体startTimeInUs
- 开始时间, 单位:微秒durationInUs
- 时长, 单位:微秒AliyunPasterControllerCompoundCaption addCaptionWithStartTime(java.lang.String text, Source bubbleEffectSource, Source fontSource, long startTimeInUs, long durationInUs)
text
- 显示的文字bubbleEffectSource
- 气泡资源fontSource
- 文字字资源startTimeInUs
- 开始时间, 单位:微秒durationInUs
- 时长, 单位:微秒AliyunPasterControllerCompoundCaption addCaptionWithStartTime(java.lang.String text, Source bubbleEffectSource, Source fontSource, long startTime, long duration, java.util.concurrent.TimeUnit timeUnit)
text
- 显示的文字bubbleEffectSource
- 气泡资源fontSource
- 文字字资源startTime
- 开始时间duration
- 时长timeUnit
- 时间单位AliyunPasterControllerImage addImage(Source source)
v3.27.0 新增
source
- 贴图路径AliyunIPasterController findControllerAtPoint(PointF point, long timeInUs)
point
- 点击的坐标(x,y),单位:像素timeInUs
- 时间戳,单位:微秒AliyunIPasterController findControllerAtPoint(PointF point, long time, java.util.concurrent.TimeUnit timeUnit)
v3.27.0 新增
point
- 点击的坐标(x,y),单位:像素time
- 时间戳timeUnit
- 时间单位java.util.List<AliyunIPasterController> findControllersByType(int type)
type
- 贴图控制器类型void remove(AliyunIPasterController aController)
aController
- PasterControllervoid setDisplaySize(int width, int height)
AliyunIEditor.init(SurfaceView, Context)
之前调用width
- height
- java.lang.IllegalStateException
- 如果width 或者 height 为0void setOnPasterRestoreListener(OnPasterRestored listener)
AliyunIEditor.init(SurfaceView, Context)
之前调用,否则会造成贴图、字幕、涂鸦等效果无法恢复的问题listener
-