com.aliyun.svideosdk.common.struct.project

## Class CaptionTrack

- java.lang.Object
- - com.aliyun.svideosdk.common.struct.project.Track
  - - com.aliyun.svideosdk.common.struct.project.PasterTrack
    - - com.aliyun.svideosdk.common.struct.project.PhotoPasterTrack
      - - com.aliyun.svideosdk.common.struct.project.CaptionTrack

-     public class CaptionTrack
      extends PhotoPasterTrack

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.aliyun.svideosdk.common.struct.project.PasterTrack

      `PasterTrack.Type`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `float` | `mScale` the scale value of caption, default:1.0

    - ### Fields inherited from class com.aliyun.svideosdk.common.struct.project.PhotoPasterTrack

      `mNodeKey`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CaptionTrack()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CaptionTrack` | `fromCaption(AliyunCaption aCaption)`
    `int` | `getBackgroundColor()` Gets the background color.
    `float` | `getBackgroundCornerRadius()` Gets the background radius.
    `Source` | `getFont()` Gets the font resource.
    `Source` | `getFontEffectSource()` Gets the effect of the text font.
    `float` | `getFontSize()` Gets the font size.
    `int` | `getOutlineColor()` Gets the text stroke color of
    `float` | `getOutlineWidth()` Gets the text stroke color of
    `float` | `getScale()` Gets the scale value of caption, default:1.0
    `int` | `getShadowColor()` Sets the shadow color of
    `float` | `getShadowOffsetX()` Gets the offset x value of the shadow.
    `float` | `getShadowOffsetY()` Gets the offset y value of the shadow.
    `java.lang.String` | `getText()` Gets the text contents.
    `int` | `getTextAlignment()` Gets the text alignment.
    `int` | `getTextColor()` Gets the text color.
    `int` | `getTypeface()` Gets the font typeface.
    `void` | `setBackgroundColor(int aBackgroundColor)` Sets the background color.
    `void` | `setBackgroundCornerRadius(float backgroundCornerRadius)` Sets the background radius.
    `void` | `setCaption(AliyunCaption caption)`
    `void` | `setFont(Source font)` Sets the font resource.
    `void` | `setFontEffectSource(Source fontEffectSource)` Sets the effect of the text font.
    `void` | `setFontSize(float fontSize)` Sets the font size.
    `void` | `setOutlineColor(int outlineColor)` Sets the text stroke color of
    `void` | `setOutlineWidth(float outlineWidth)` Sets the text stroke color of
    `void` | `setScale(float scale)` Sets the scale value of caption, default:1.0
    `void` | `setShadowColor(int shadowColor)` Gets the shadow color of
    `void` | `setShadowOffsetX(float shadowOffsetX)` Sets the offset x value of the shadow.
    `void` | `setShadowOffsetY(float shadowOffsetY)` Sets the offset y value of the shadow.
    `void` | `setText(java.lang.String text)` Sets the text contents.
    `void` | `setTextAlignment(int aTextAlignment)` Sets the text alignment.
    `void` | `setTextColor(int textColor)` Sets the text color.
    `void` | `setTypeface(int typeface)` Sets the font typeface.
    `AliyunCaption` | `toCaption()`
    `java.lang.String` | `toString()`
    `void` | `updateInfo()`

    - ### Methods inherited from class com.aliyun.svideosdk.common.struct.project.PhotoPasterTrack

      `getActions, getFrameArray, getHeight, getName, getNodeKey, getRotation, getSource, getTimeArray, getTimelineIn, getTimelineOut, getWidth, getX, getY, isMirror, setFrameArray, setHeight, setMirror, setName, setNodeKey, setRotation, setSource, setTimeArray, setTimelineIn, setTimelineOut, setWidth, setX, setY`

    - ### Methods inherited from class com.aliyun.svideosdk.common.struct.project.PasterTrack

      `getType, setType`

    - ### Methods inherited from class com.aliyun.svideosdk.common.struct.project.Track

      `getId, setId`

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

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

- - ### Field Detail

    - #### mScale

          public float mScale

      the scale value of caption, default:1.0

  - ### Constructor Detail

    - #### CaptionTrack

          public CaptionTrack()

  - ### Method Detail

    - #### getText

          public java.lang.String getText()

      Gets the text contents.
      Returns:
        text

    - #### setText

          public void setText(java.lang.String text)

      Sets the text contents.
      Parameters:
        `text` - text

    - #### getScale

          public float getScale()

      Gets the scale value of caption, default:1.0
      Returns:
        scale

    - #### setScale

          public void setScale(float scale)

      Sets the scale value of caption, default:1.0
      Parameters:
        `scale` - scale

    - #### getFontSize

          public float getFontSize()

      Gets the font size.
      Returns:
        font size

    - #### setFontSize

          public void setFontSize(float fontSize)

      Sets the font size.
      Parameters:
        `fontSize` - font size

    - #### getTypeface

          public int getTypeface()

      Gets the font typeface.
      Returns:
        typeface

    - #### setTypeface

          public void setTypeface(int typeface)

      Sets the font typeface.
      Parameters:
        `typeface` - typeface

    - #### getTextColor

          public int getTextColor()

      Gets the text color.
      Returns:
        text color

    - #### setTextColor

          public void setTextColor(int textColor)

      Sets the text color.
      Parameters:
        `textColor` - font color

    - #### getOutlineColor

          public int getOutlineColor()

      Gets the text stroke color of
      Returns:
        outlineColor

    - #### setOutlineColor

          public void setOutlineColor(int outlineColor)

      Sets the text stroke color of
      Parameters:
        `outlineColor` - outlineColor

    - #### getOutlineWidth

          public float getOutlineWidth()

      Gets the text stroke color of
      Returns:
        outlineWidth

    - #### setOutlineWidth

          public void setOutlineWidth(float outlineWidth)

      Sets the text stroke color of
      Parameters:
        `outlineWidth` - outlineWidth

    - #### getShadowColor

          public int getShadowColor()

      Sets the shadow color of
      Returns:
        shadow color

    - #### setShadowColor

          public void setShadowColor(int shadowColor)

      Gets the shadow color of
      Parameters:
        `shadowColor` - shadow color

    - #### getShadowOffsetX

          public float getShadowOffsetX()

      Gets the offset x value of the shadow.
      Returns:
        offset x

    - #### setShadowOffsetX

          public void setShadowOffsetX(float shadowOffsetX)

      Sets the offset x value of the shadow.
      Parameters:
        `shadowOffsetX` - offset x

    - #### getShadowOffsetY

          public float getShadowOffsetY()

      Gets the offset y value of the shadow.
      Returns:
        offset y

    - #### setShadowOffsetY

          public void setShadowOffsetY(float shadowOffsetY)

      Sets the offset y value of the shadow.
      Parameters:
        `shadowOffsetY` - offset y

    - #### getFont

          public Source getFont()

      Gets the font resource.
      Returns:
        font resource

    - #### setFont

          public void setFont(Source font)

      Sets the font resource.
      Parameters:
        `font` - font resource

    - #### getFontEffectSource

          public Source getFontEffectSource()

      Gets the effect of the text font.
      Returns:
        font effect

    - #### getTextAlignment

          public int getTextAlignment()

      Gets the text alignment. Added in v3.24.0
      Returns:
        text alignment

    - #### setTextAlignment

          public void setTextAlignment(int aTextAlignment)

      Sets the text alignment. Added in v3.24.0
      Parameters:
        `aTextAlignment` - text alignment

    - #### getBackgroundColor

          public int getBackgroundColor()

      Gets the background color. Added in v3.24.0
      Returns:
        background color

    - #### setBackgroundColor

          public void setBackgroundColor(int aBackgroundColor)

      Sets the background color. Added in v3.24.0
      Parameters:
        `aBackgroundColor` - background color

    - #### getBackgroundCornerRadius

          public float getBackgroundCornerRadius()

      Gets the background radius. Added in v3.31.0
      Returns:
        background radius

    - #### setBackgroundCornerRadius

          public void setBackgroundCornerRadius(float backgroundCornerRadius)

      Sets the background radius. Added in v3.31.0
      Parameters:
        `backgroundCornerRadius` - background color radius

    - #### setFontEffectSource

          public void setFontEffectSource(Source fontEffectSource)

      Sets the effect of the text font.
      Parameters:
        `fontEffectSource` - font effect

    - #### setCaption

          public void setCaption(AliyunCaption caption)

    - #### updateInfo

          public void updateInfo()

    - #### fromCaption

          public static CaptionTrack fromCaption(AliyunCaption aCaption)

    - #### toCaption

          public AliyunCaption toCaption()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `PhotoPasterTrack`