com.aliyun.svideosdk.common

## Class AliyunCaption

- java.lang.Object
- - AliyunObject
  - - com.aliyun.svideosdk.common.AliyunCaption

-     public class AliyunCaption
      extends AliyunObject

  Caption Bean

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.List<java.lang.Object>` | `mActions`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AliyunCaption()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `addAction(java.lang.Object actionObj)`
    `int` | `clearAction()`
    `java.util.List<java.lang.Object>` | `getActionList()`
    `AliyunColor` | `getBackgroundColor()` Get the background color of caption Added in v3.23.0
    `ISource` | `getBubbleSource()` Get the template source for bubble text Added in v3.23.0
    `AliyunColor` | `getColor()` Get the text color of caption
    `long` | `getDuration()` Get Caption Render Duration in milliseconds
    `ISource` | `getFontEffectSource()` Get the template source for font effect Added in v3.23.0
    `ISource` | `getFontSource()` Get the font source.
    `AliyunFontStyle` | `getFontStyle()` Get the font style of the caption
    `int` | `getId()` Get Caption View ID
    `AliyunColor` | `getOutlineColor()` Get the text stroke color of caption
    `float` | `getOutlineWidth()` Get the text stroke width, unit: pixel
    `PointF` | `getPosition()` Get the center point position (x,y) of the Caption, the value of x and y is between [0-1]
    `float` | `getRotate()` Get the degree of rotation of the caption
    `float` | `getScale()` Get the scale value of caption, the default is 1.0
    `AliyunColor` | `getShadowColor()` Get the shadow color of caption
    `PointF` | `getShadowOffset()` Get the offset value of the shadow, including (x, y) two directions, unit: pixel
    `RectF` | `getSize()` Get the size of the Caption, get the width and height through `android.graphics.RectF#width()` and `android.graphics.RectF#height()`
    `long` | `getStartTime()` Get Caption Render Start Time in milliseconds
    `java.lang.String` | `getText()` Get Caption Text
    `int` | `getTextAlignment()` Get alignment of text Added in v3.23.0
    `int` | `removeAction(java.lang.Object actionObj)`
    `void` | `setBackgroundColor(AliyunColor aColor)` Set the background color of Caption Added in v3.23.0
    `void` | `setBubbleSource(ISource bubbleSource)` Set the template for bubble text Added in v3.23.0
    `void` | `setColor(AliyunColor aColor)` Set the text color of Caption
    `void` | `setDuration(long aDuration)` Set Caption Render Duration in milliseconds
    `void` | `setFontEffectSource(ISource fontEffectSource)` Set the template for font effect Added in v3.23.0
    `void` | `setFontStyle(AliyunFontStyle aFontStyle)` Set the font style of the caption
    `void` | `setOutlineColor(AliyunColor aOutlineColor)` Set the text stroke color of caption
    `void` | `setOutlineWidth(float aOutlineWidth)` Set the text stroke width, unit: pixel
    `void` | `setPosition(PointF aPosition)` Set the center point position of the caption (x,y), the value of x and y are between [0-1]
    `void` | `setRotate(float degree)` Set the degree of rotation of the caption
    `void` | `setScale(float aScale)` Set caption scale value
    `void` | `setShadowColor(AliyunColor aShadowColor)` Set the shadow color of caption
    `void` | `setShadowOffset(PointF aShadowOffset)` Set the offset value of the shadow, including (x, y) two directions, unit: pixel
    `void` | `setSize(RectF size)` Set the size of the Caption, get the width and height through `android.graphics.RectF#width()` and `android.graphics.RectF#height()`
    `void` | `setStartTime(long aStartTime)` Set Caption Render Start Time in milliseconds
    `void` | `setText(java.lang.String aText)` Set Caption Text
    `void` | `setTextAlignment(int aTextAlignment)` Set the alignemnt of text Added in v3.23.0

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### mActions

          protected java.util.List<java.lang.Object> mActions

  - ### Constructor Detail

    - #### AliyunCaption

          public AliyunCaption()

  - ### Method Detail

    - #### getId

          public int getId()

      Get Caption View ID
      Returns:
        ViewID

    - #### getStartTime

          public long getStartTime()

      Get Caption Render Start Time in milliseconds
      Returns:
        Render Start Time in milliseconds

    - #### setStartTime

          public void setStartTime(long aStartTime)

      Set Caption Render Start Time in milliseconds
      Parameters:
        `aStartTime` - Start Time in milliseconds

    - #### getDuration

          public long getDuration()

      Get Caption Render Duration in milliseconds
      Returns:
        Duration in milliseconds

    - #### setDuration

          public void setDuration(long aDuration)

      Set Caption Render Duration in milliseconds
      Parameters:
        `aDuration` - Duration in milliseconds

    - #### getText

          public java.lang.String getText()

      Get Caption Text
      Returns:
        text

    - #### setText

          public void setText(java.lang.String aText)

      Set Caption Text
      Parameters:
        `aText` - Text

    - #### getPosition

          public PointF getPosition()

      Get the center point position (x,y) of the Caption, the value of x and y is between [0-1]
      Returns:
        center point position (x,y), the value of x and y is between [0-1]

    - #### setPosition

          public void setPosition(PointF aPosition)

      Set the center point position of the caption (x,y), the value of x and y are between [0-1]
      Parameters:
        `aPosition` - center point position (x,y), the value of x and y is between [0-1]

    - #### getSize

          public RectF getSize()

      Get the size of the Caption, get the width and height through `android.graphics.RectF#width()` and `android.graphics.RectF#height()`
      Returns:
        the size of the Caption
      See Also:
        `android.graphics.RectF`

    - #### setSize

          public void setSize(RectF size)

      Set the size of the Caption, get the width and height through `android.graphics.RectF#width()` and `android.graphics.RectF#height()`
      See Also:
        `android.graphics.RectF`

    - #### getRotate

          public float getRotate()

      Get the degree of rotation of the caption
      Returns:
        degree

    - #### setRotate

          public void setRotate(float degree)

      Set the degree of rotation of the caption
      Parameters:
        `aRotate` - degree

    - #### getScale

          public float getScale()

      Get the scale value of caption, the default is 1.0
      Returns:
        the scale value of caption

    - #### setScale

          public void setScale(float aScale)

      Set caption scale value
      Parameters:
        `aScale` - > 0

    - #### getFontStyle

          public AliyunFontStyle getFontStyle()

      Get the font style of the caption
      Returns:
        the font style
      See Also:
        `AliyunFontStyle`

    - #### setFontStyle

          public void setFontStyle(AliyunFontStyle aFontStyle)

      Set the font style of the caption
      Parameters:
        `aFontStyle` - the font style
      See Also:
        `AliyunFontStyle`

    - #### getTextAlignment

          public int getTextAlignment()

      Get alignment of text Added in v3.23.0
      Returns:
        alignemnt

    - #### setTextAlignment

          public void setTextAlignment(int aTextAlignment)

      Set the alignemnt of text Added in v3.23.0
      Parameters:
        `aTextAlignment` - the aliment e.g. AlignLeft = 1; AlignRight = 2; AlignHCenter = 4;
      See Also:
        `AliyunFontStyle`

    - #### getColor

          public AliyunColor getColor()

      Get the text color of caption
      Returns:
        color value
      See Also:
        `AliyunColor`

    - #### setColor

          public void setColor(AliyunColor aColor)

      Set the text color of Caption
      Parameters:
        `aColor` - color value
      See Also:
        `AliyunColor`

    - #### getBackgroundColor

          public AliyunColor getBackgroundColor()

      Get the background color of caption Added in v3.23.0
      Returns:
        color value
      See Also:
        `AliyunColor`

    - #### setBackgroundColor

          public void setBackgroundColor(AliyunColor aColor)

      Set the background color of Caption Added in v3.23.0
      Parameters:
        `aColor` - color value
      See Also:
        `AliyunColor`

    - #### getOutlineColor

          public AliyunColor getOutlineColor()

      Get the text stroke color of caption
      Returns:
        color value
      See Also:
        `AliyunColor`

    - #### setOutlineColor

          public void setOutlineColor(AliyunColor aOutlineColor)

      Set the text stroke color of caption
      Parameters:
        `aOutlineColor` - color value
      See Also:
        `AliyunColor`

    - #### getOutlineWidth

          public float getOutlineWidth()

      Get the text stroke width, unit: pixel
      Returns:
        stroke width, unit: pixel

    - #### setOutlineWidth

          public void setOutlineWidth(float aOutlineWidth)

      Set the text stroke width, unit: pixel
      Parameters:
        `aOutlineWidth` - stroke width, unit: pixel

    - #### getShadowColor

          public AliyunColor getShadowColor()

      Get the shadow color of caption
      Returns:
        color value
      See Also:
        `AliyunColor`

    - #### setShadowColor

          public void setShadowColor(AliyunColor aShadowColor)

      Set the shadow color of caption
      Parameters:
        `aShadowColor` - color value
      See Also:
        `AliyunColor`

    - #### getShadowOffset

          public PointF getShadowOffset()

      Get the offset value of the shadow, including (x, y) two directions, unit: pixel
      Returns:
        The offset value of the shadow in (x,y)
      See Also:
        `android.graphics.PointF`

    - #### setShadowOffset

          public void setShadowOffset(PointF aShadowOffset)

      Set the offset value of the shadow, including (x, y) two directions, unit: pixel
      Parameters:
        `aShadowOffset` - The offset value of the shadow in (x,y)
      See Also:
        `android.graphics.PointF`

    - #### getBubbleSource

          public ISource getBubbleSource()

      Get the template source for bubble text Added in v3.23.0

    - #### setBubbleSource

          public void setBubbleSource(ISource bubbleSource)

      Set the template for bubble text Added in v3.23.0
      Parameters:
        `bubbleSource` - template Source

    - #### getFontEffectSource

          public ISource getFontEffectSource()

      Get the template source for font effect Added in v3.23.0

    - #### setFontEffectSource

          public void setFontEffectSource(ISource fontEffectSource)

      Set the template for font effect Added in v3.23.0
      Parameters:
        `fontEffectSource` - template source

    - #### getFontSource

          public ISource getFontSource()

      Get the font source. Added in v3.23.0

    - #### addAction

          public int addAction(java.lang.Object actionObj)

    - #### getActionList

          public java.util.List<java.lang.Object> getActionList()

    - #### removeAction

          public int removeAction(java.lang.Object actionObj)

    - #### clearAction

          public int clearAction()