public class

KSYStickerItem

extends Object
java.lang.Object
   ↳ com.ksyun.media.shortvideo.sticker.KSYStickerItem

Class Overview

for sticker draw

Summary

Fields
public long mDuration
public long mStartTime
Public Constructors
KSYStickerItem(StickerHelpBoxInfo helpBoxInfo)
Public Methods
void draw(Canvas canvas)
draw sticker
void drawSticker(Canvas canvas)
RectF getBitRect()
RectF getDeleteRect()
boolean getDraw()
long getDuration()
long getEndTime()
RectF getRotateRect()
long getStartTime()
int getStickerType()
String getText()
返回文字信息,可能为null
float getTextSize()
return current text size
void init(KSYStickerInfo info, View parentView)
void release()
void setAutoNewLine(boolean autoNewLine)
auto new line for text
void setDraw(boolean draw)
void setDrawHelpTool(boolean draw)
void setText(String text)
修改/增加文字内容
void setTextColor(int newColor)
set color of text
void setUpdateListener(KSYStickerView.OnUpdateDrawListener listener)
由贴纸内部触发贴纸父控件的绘制
void startDraw()
开始动态贴纸的解析
void stopDraw()
停止动态贴纸的解析
void updatePos(float dx, float dy)
update pos
void updateRotateAndScale(float dx, float dy)
旋转 缩放 更新
void updateScale(float scale)
void updateStickerInfo(long startTime, long duration)
更新贴纸的时间信息
void updateStickerInfo(KSYStickerInfo info, View parentView)
会对本贴纸做重新初始化,之前的旋转缩放移动等信息会失效
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public long mDuration

public long mStartTime

Public Constructors

public KSYStickerItem (StickerHelpBoxInfo helpBoxInfo)

Public Methods

public void draw (Canvas canvas)

draw sticker

public void drawSticker (Canvas canvas)

public RectF getBitRect ()

public RectF getDeleteRect ()

public boolean getDraw ()

public long getDuration ()

public long getEndTime ()

public RectF getRotateRect ()

public long getStartTime ()

public int getStickerType ()

public String getText ()

返回文字信息,可能为null

public float getTextSize ()

return current text size

public void init (KSYStickerInfo info, View parentView)

public void release ()

public void setAutoNewLine (boolean autoNewLine)

auto new line for text

public void setDraw (boolean draw)

public void setDrawHelpTool (boolean draw)

public void setText (String text)

修改/增加文字内容

public void setTextColor (int newColor)

set color of text

public void setUpdateListener (KSYStickerView.OnUpdateDrawListener listener)

由贴纸内部触发贴纸父控件的绘制

public void startDraw ()

开始动态贴纸的解析

public void stopDraw ()

停止动态贴纸的解析

public void updatePos (float dx, float dy)

update pos

public void updateRotateAndScale (float dx, float dy)

旋转 缩放 更新

public void updateScale (float scale)

public void updateStickerInfo (long startTime, long duration)

更新贴纸的时间信息

public void updateStickerInfo (KSYStickerInfo info, View parentView)

会对本贴纸做重新初始化,之前的旋转缩放移动等信息会失效