public interface AliyunPasterManager
setDisplaySize(int, int)
must be invoked to specify the size of the display area where
the stickers are rendered.Modifier and Type | Method and Description |
---|---|
AliyunPasterControllerCompoundCaption |
addCaptionWithStartTime(java.lang.String text,
Source bubbleEffectSource,
Source fontSource,
long startTimeInUs,
long durationInUs)
Adds a standard caption and sets the display duration of the caption.
|
AliyunPasterControllerCompoundCaption |
addCaptionWithStartTime(java.lang.String text,
Source bubbleEffectSource,
Source fontSource,
long startTime,
long duration,
java.util.concurrent.TimeUnit timeUnit)
Adds a standard caption and sets the display duration of the caption.
|
AliyunPasterControllerCompoundCaption |
addCaptionWithStartTime(java.lang.String text,
java.lang.String bubbleEffectPath,
java.lang.String font,
long startTimeInUs,
long durationInUs)
Deprecated.
|
AliyunPasterControllerImage |
addImage(Source source)
Adds a image.
|
AliyunPasterController |
addPaster(Source source)
Adds a sticker.
|
AliyunPasterController |
addPaster(java.lang.String path)
Deprecated.
Replaced by
addPaster(Source) . |
AliyunPasterController |
addPasterWithStartTime(Source source,
long startTimeInUs,
long durationInUs)
Adds a sticker and sets the display duration of the sticker.
|
AliyunPasterController |
addPasterWithStartTime(Source source,
long startTime,
long duration,
java.util.concurrent.TimeUnit timeUnit)
Adds a sticker and sets the display duration of the sticker.
|
AliyunPasterController |
addPasterWithStartTime(java.lang.String path,
long startTimeInUs,
long durationInUs)
Deprecated.
Replaced by
addPasterWithStartTime(Source,long,long) . |
AliyunPasterController |
addSubtitle(java.lang.String text,
Source font)
Deprecated.
use
addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long) instead
Adds a standard caption.
Added in v3.23.0 |
AliyunPasterController |
addSubtitle(java.lang.String text,
java.lang.String font)
Deprecated.
use
addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long) instead
Adds a standard caption. |
AliyunPasterController |
addSubtitleWithStartTime(java.lang.String text,
Source font,
long startTimeInUs,
long durationInUs)
Deprecated.
use
addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long) instead
Adds a standard caption and sets the display duration of the caption.
Added in v3.23.0 |
AliyunPasterController |
addSubtitleWithStartTime(java.lang.String text,
java.lang.String font,
long startTimeInUs,
long durationInUs)
Deprecated.
use
addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long) instead
Adds a standard caption and sets the display duration of the caption. |
AliyunIPasterController |
findControllerAtPoint(PointF point,
long timeInUs)
Find paster controller at startTime in microseconds
Added in v3.22.0
|
AliyunIPasterController |
findControllerAtPoint(PointF point,
long time,
java.util.concurrent.TimeUnit timeUnit)
Find paster controller at startTime
|
java.util.List<AliyunIPasterController> |
findControllersByType(int type)
Find paster controller for selected type
|
void |
remove(AliyunIPasterController aController)
delete aController 贴图控制器
|
void |
setDisplaySize(int width,
int height)
Sets the size of the display area where the sticker is rendered.
|
void |
setOnPasterRestoreListener(OnPasterRestored listener)
Sets the callback that is used to restore UI settings when a sticker is restored.
|
@Deprecated AliyunPasterController addPaster(java.lang.String path)
addPaster(Source)
.path
- The path of the sticker.AliyunPasterController addPaster(Source source)
source
- The path of the sticker.@Deprecated AliyunPasterController addPasterWithStartTime(java.lang.String path, long startTimeInUs, long durationInUs)
addPasterWithStartTime(Source,long,long)
.path
- The path of the sticker.Unit : MicrosecondsstartTimeInUs
- The time when the sticker is set to visible.Unit : MicrosecondsdurationInUs
- The display duration of the sticker.AliyunPasterController addPasterWithStartTime(Source source, long startTimeInUs, long durationInUs)
source
- The path of the sticker.startTimeInUs
- The time when the sticker is set to visible.Unit : MicrosecondsdurationInUs
- The display duration of the sticker.Unit : MicrosecondsAliyunPasterController addPasterWithStartTime(Source source, long startTime, long duration, java.util.concurrent.TimeUnit timeUnit)
source
- The path of the sticker.startTime
- The time when the sticker is set to visible.duration
- The display duration of the sticker.timeUnit
- The time unit@Deprecated AliyunPasterController addSubtitle(java.lang.String text, java.lang.String font)
addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)
instead
Adds a standard caption.text
- The text contents.font
- The text font.@Deprecated AliyunPasterController addSubtitle(java.lang.String text, Source font)
addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)
instead
Adds a standard caption.
Added in v3.23.0text
- The text contents.font
- The text font resource.@Deprecated AliyunPasterController addSubtitleWithStartTime(java.lang.String text, java.lang.String font, long startTimeInUs, long durationInUs)
addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)
instead
Adds a standard caption and sets the display duration of the caption.text
- The text contents.font
- The text font.startTimeInUs
- The time when the caption is set to visible.Unit : MicrosecondsdurationInUs
- The display duration of the caption.Unit : Microseconds@Deprecated AliyunPasterController addSubtitleWithStartTime(java.lang.String text, Source font, long startTimeInUs, long durationInUs)
addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)
instead
Adds a standard caption and sets the display duration of the caption.
Added in v3.23.0text
- The text contents.font
- The text font.startTimeInUs
- The time when the caption is set to visible. .Unit : MicrosecondsdurationInUs
- The display duration of the caption..Unit : Microseconds@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)
instead.text
- The text contents.bubbleEffectPath
- the bubble effect pathfont
- The text font.startTimeInUs
- The time when the caption is set to visible..Unit : MicrosecondsdurationInUs
- The display duration of the caption..Unit : MicrosecondsAliyunPasterControllerCompoundCaption addCaptionWithStartTime(java.lang.String text, Source bubbleEffectSource, Source fontSource, long startTimeInUs, long durationInUs)
text
- The text contents.bubbleEffectSource
- the bubble effect sourcefontSource
- The text font source.startTimeInUs
- The time when the caption is set to visible..Unit : MicrosecondsdurationInUs
- The display duration of the caption..Unit : MicrosecondsAliyunPasterControllerCompoundCaption addCaptionWithStartTime(java.lang.String text, Source bubbleEffectSource, Source fontSource, long startTime, long duration, java.util.concurrent.TimeUnit timeUnit)
text
- The text contents.bubbleEffectSource
- the bubble effect sourcefontSource
- The text font source.startTime
- The time when the caption is set to visible.duration
- The display duration of the caption.timeUnit
- The time unitAliyunPasterControllerImage addImage(Source source)
Added in v3.27.0
source
- The path of the sticker.AliyunIPasterController findControllerAtPoint(PointF point, long timeInUs)
point
- click point between 0 and 1 in pixelstimeInUs
- the caption show time in microsecondsAliyunIPasterController findControllerAtPoint(PointF point, long time, java.util.concurrent.TimeUnit timeUnit)
Added in v3.27.0
point
- click point between 0 and 1 in pixelstime
- the paster show timetimeUnit
- the time unitjava.util.List<AliyunIPasterController> findControllersByType(int type)
type
- the paster controller typevoid remove(AliyunIPasterController aController)
void setDisplaySize(int width, int height)
AliyunIEditor.init(SurfaceView, Context)
.width
- height
- java.lang.IllegalStateException
- if the width or height is set to 0.void setOnPasterRestoreListener(OnPasterRestored listener)
AliyunIEditor.init(SurfaceView, Context)
. Otherwise, effects such as stickers, captions, and doodles cannot be restored.listener
-