public class AliyunPasterControllerCompoundCaption extends AliyunPasterAbstractController<AliyunCaption>
Modifier and Type | Field and Description |
---|---|
static int |
AlignCenter |
static int |
AlignLeft |
static int |
AlignRight |
mModel, mRender
Modifier and Type | Method and Description |
---|---|
int |
addFrameAnimation(ActionBase action)
Adds an animation to a stream or material.
|
int |
apply() |
int |
clearFrameAnimation()
Clear Animation
|
AliyunColor |
getBackgroundColor()
Get the background color of caption
Added in v3.23.0
|
float |
getBackgroundCornerRadius()
Get the background radius of caption
Added in v3.31.0
|
java.lang.String |
getBubbleEffectTemplate()
Deprecated.
Use
getBubbleEffectTemplateSource() instead. |
ISource |
getBubbleEffectTemplateSource()
Get the template Source for bubble text
Added in v3.23.0
|
AliyunColor |
getColor()
Get the text color of caption
Added in v3.22.0
|
long |
getDuration()
Get Caption Render Duration in microsecond
|
java.lang.String |
getFontEffectTemplate()
Deprecated.
Use
getFontEffectTemplateSource() instead. |
ISource |
getFontEffectTemplateSource()
Get the template Source for font effect
Added in v3.23.0
|
ISource |
getFontPath()
Get Font Source
Added in v3.24.0
|
AliyunFontStyle |
getFontStyle()
Deprecated.
|
AliyunTypeface |
getFontTypeface()
Set the font typeface style
Added in v3.24.0
|
java.util.List<ActionBase> |
getFrameAnimations()
Get Frame Animation List
Added in v3.22.0
|
AliyunColor |
getOutlineColor()
Get the text stroke color of caption
Added in v3.22.0
|
float |
getOutlineWidth()
Get the text stroke width, unit: pixel
Added in v3.22.0
|
PointF |
getPosition()
Get the center point position (x,y) of the Sticker, unit : pixel
|
float |
getRotate()
Get the radian of rotation of the sticker
|
float |
getScale()
Get the scale value of caption, the default is 1.0
Added in v3.22.0
|
AliyunColor |
getShadowColor()
Get the shadow color of caption
Added in v3.22.0
|
PointF |
getShadowOffset()
Get the offset value of the shadow, including (x, y) two directions, unit: pixel,range: [0-32]
Added in v3.22.0
|
RectF |
getSize()
Get the size of the Sticker, get the width and height through
android.graphics.RectF#width() and android.graphics.RectF#height() , unit : pixel |
long |
getStartTime()
Get Caption Render Start Time in microsecond
|
java.lang.String |
getText()
Get Caption Text
Added in v3.22.0
|
int |
getTextAlignment()
Get alignment of text
Added in v3.23.0
|
int |
getType()
Gets the sticker type.
|
int |
removeFrameAnimation(ActionBase action)
Removes an animation.
|
void |
setBackgroundColor(AliyunColor aColor)
Set the background color of Caption
Added in v3.23.0
|
void |
setBackgroundCornerRadius(float radius)
Get the background radius of caption
Added in v3.31.0
|
void |
setBubbleEffectTemplate(Source aStyleTemplate)
Set the template for bubble text
Added in v3.23.0
|
void |
setBubbleEffectTemplate(java.lang.String aStyleTemplate)
Deprecated.
Use
setBubbleEffectTemplate(Source) instead. |
void |
setColor(AliyunColor aColor)
Set the text color of Caption
Added in v3.22.0
|
void |
setDuration(long aDuration,
java.util.concurrent.TimeUnit timeUnit)
Set Caption Render Duration
|
void |
setFontEffectTemplate(Source fontEffectSource)
Set the template for font effect
Added in v3.23.0
|
void |
setFontEffectTemplate(java.lang.String aStyleTemplate)
Deprecated.
Use
setFontEffectTemplate(Source) instead. |
void |
setFontPath(ISource aFontPath)
Set the font ttf of the caption
Added in v3.24.0
|
void |
setFontStyle(AliyunFontStyle aFontStyle)
Deprecated.
|
void |
setFontTypeface(AliyunTypeface aFontTypeface)
Set the font typeface of the caption
Added in v3.24.0
|
int |
setFrameAnimation(ActionBase action)
Adds an animation to a stream or material.
|
void |
setOutlineColor(AliyunColor aOutlineColor)
Set the text stroke color of caption
Added in v3.22.0
|
void |
setOutlineWidth(float aOutlineWidth)
Set the text stroke width, unit: pixel, range : [0-64]
Added in v3.22.0
|
void |
setPosition(PointF aPosition)
Set the center point position of the sticker (x,y), unit : pixel
|
void |
setRotate(float degree)
Set the radian of rotation of the sticker
|
void |
setScale(float aScale)
Set caption scale value
Added in v3.22.0
|
void |
setShadowColor(AliyunColor aShadowColor)
Set the shadow color of caption
Added in v3.22.0
|
void |
setShadowOffset(PointF aShadowOffset)
Set the offset value of the shadow, including (x, y) two directions, unit: pixel, range: [0-32]
Added in v3.22.0
|
void |
setStartTime(long aStartTime,
java.util.concurrent.TimeUnit timeUnit)
Set Caption Render Start Time
|
void |
setText(java.lang.String aText)
Set Caption Text
Added in v3.22.0
|
void |
setTextAlignment(int aTextAlignment)
Set the alignemnt of text
Added in v3.23.0
|
getDuration, getStartTime, setDuration, setStartTime
public static final int AlignLeft
public static final int AlignRight
public static final int AlignCenter
public int getType()
AliyunIPasterController
EffectPaster.PASTER_TYPE_GIF
,
EffectPaster.PASTER_TYPE_CAPTION
,
EffectPaster.PASTER_TYPE_IMAGE
public long getStartTime()
AliyunIPasterController
public void setStartTime(long aStartTime, java.util.concurrent.TimeUnit timeUnit)
AliyunIPasterController
Added in v3.27.0
aStartTime
- Start TimetimeUnit
- Time Unitpublic long getDuration()
AliyunIPasterController
public void setDuration(long aDuration, java.util.concurrent.TimeUnit timeUnit)
AliyunIPasterController
Added in v3.27.0
aDuration
- DurationtimeUnit
- Time Unitpublic PointF getPosition()
AliyunIPasterController
public void setPosition(PointF aPosition)
AliyunIPasterController
aPosition
- center point position (x,y)public RectF getSize()
AliyunIPasterController
android.graphics.RectF#width()
and android.graphics.RectF#height()
, unit : pixelandroid.graphics.RectF
public float getRotate()
AliyunIPasterController
public void setRotate(float degree)
AliyunIPasterController
degree
- radianpublic java.lang.String getText()
public void setText(java.lang.String aText)
aText
- Textpublic float getScale()
public void setScale(float aScale)
aScale
- > 0@Deprecated public AliyunFontStyle getFontStyle()
AliyunFontStyle
@Deprecated public void setFontStyle(AliyunFontStyle aFontStyle)
aFontStyle
- the font styleAliyunFontStyle
public ISource getFontPath()
public void setFontPath(ISource aFontPath)
aFontPath
- the font ttf pathpublic AliyunTypeface getFontTypeface()
public void setFontTypeface(AliyunTypeface aFontTypeface)
aFontTypeface
- the font typefaceAliyunTypeface
public int getTextAlignment()
public void setTextAlignment(int aTextAlignment)
aTextAlignment
- the alignment of text
e.g.
AlignLeft = 1;
AlignRight = 2;
AlignHCenter = 4;AliyunFontStyle
public AliyunColor getColor()
AliyunColor
public void setColor(AliyunColor aColor)
aColor
- color valueAliyunColor
public AliyunColor getBackgroundColor()
AliyunColor
public void setBackgroundColor(AliyunColor aColor)
aColor
- color valueAliyunColor
public void setBackgroundCornerRadius(float radius)
public float getBackgroundCornerRadius()
public AliyunColor getOutlineColor()
AliyunColor
public void setOutlineColor(AliyunColor aOutlineColor)
aOutlineColor
- color valueAliyunColor
public float getOutlineWidth()
public void setOutlineWidth(float aOutlineWidth)
aOutlineWidth
- stroke width, unit: pixelpublic AliyunColor getShadowColor()
AliyunColor
public void setShadowColor(AliyunColor aShadowColor)
aShadowColor
- color valueAliyunColor
public PointF getShadowOffset()
android.graphics.PointF
public void setShadowOffset(PointF aShadowOffset)
aShadowOffset
- The offset value of the shadow in (x,y)android.graphics.PointF
public void setBubbleEffectTemplate(java.lang.String aStyleTemplate)
setBubbleEffectTemplate(Source)
instead.aStyleTemplate
- template pathpublic java.lang.String getBubbleEffectTemplate()
getBubbleEffectTemplateSource()
instead.public void setBubbleEffectTemplate(Source aStyleTemplate)
aStyleTemplate
- template Sourcepublic ISource getBubbleEffectTemplateSource()
public void setFontEffectTemplate(java.lang.String aStyleTemplate)
setFontEffectTemplate(Source)
instead.aStyleTemplate
- template pathpublic void setFontEffectTemplate(Source fontEffectSource)
fontEffectSource
- template Sourcepublic java.lang.String getFontEffectTemplate()
getFontEffectTemplateSource()
instead.public ISource getFontEffectTemplateSource()
public int apply()
public int addFrameAnimation(ActionBase action)
action
- ActionBase
public int removeFrameAnimation(ActionBase action)
action
- public int setFrameAnimation(ActionBase action)
action,
- if is null, will clean current animationsActionBase
public int clearFrameAnimation()
public java.util.List<ActionBase> getFrameAnimations()