com.aliyun.svideosdk.editor

## Interface AliyunPasterController

- All Superinterfaces:
    AliyunIPasterController

      public interface AliyunPasterController
      extends AliyunIPasterController

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `AnimPlayerView` | `createPasterPlayer(TextureView view)` Creates a player to preview stickers.
    `int` | `editCompleted()` The callback that is used to render stickers based on the settings in the UI layer after editing is complete.
    `void` | `editStart()` The callback that is used to stop the rendering of stickers when editing is started in the UI layer.
    `int` | `getConfigTextColor()` Gets the text color set in the configuration file.
    `int` | `getConfigTextStrokeColor()` Gets the text stroke color set in the configuration file.
    `EffectBase` | `getEffect()` Gets the current effect.
    `float` | `getPasterCenterX()` Gets the x coordinate of the centroid of the sticker in the screen coordinate system.
    `float` | `getPasterCenterY()` Gets the y coordinate of the centroid of the sticker in the screen coordinate system.
    `long` | `getPasterDuration()` Gets the display duration of the sticker.
    `long` | `getPasterDuration(java.util.concurrent.TimeUnit timeUnit)` Gets the display duration of the sticker.
    `int` | `getPasterHeight()` Gets the height of the sticker in the screen coordinate system.
    `java.lang.String` | `getPasterIconPath()` Gets the path to the icon of the sticker.
    `float` | `getPasterRotation()` Gets the rotation angle of the sticker.
    `long` | `getPasterStartTime()` Gets the time when the sticker is set to visible.
    `long` | `getPasterStartTime(java.util.concurrent.TimeUnit timeUnit)` Gets the time when the sticker is set to visible.
    `java.lang.String` | `getPasterTextFont()` Deprecated. Replaced by `getPasterTextFontSource()`.
    `Source` | `getPasterTextFontSource()` Gets the text font of an standard caption.
    `int` | `getPasterTextHeight()` Gets the text height of an animated caption.
    `int` | `getPasterTextOffsetX()` Gets the horizontal offset of the text.
    `int` | `getPasterTextOffsetY()` Gets the vertical offset of the text.
    `float` | `getPasterTextRotation()` Gets the text rotation angle of an animated caption.
    `int` | `getPasterTextWidth()` Gets the text width of an animated caption.
    `int` | `getPasterType()` Gets the sticker type.
    `int` | `getPasterWidth()` Gets the width of the sticker in the screen coordinate system.
    `java.lang.String` | `getText()` Gets the text contents.
    `int` | `getTextBgLabelColor()` Gets the background color of text.
    `int` | `getTextColor()` Gets the text color.
    `int` | `getTextStrokeColor()` Gets the text stroke color.
    `boolean` | `isOnlyApplyUI()` Gets whether the parameter is only applied to the UI layer.
    `boolean` | `isPasterExists()` Gets whether the sticker file exists.
    `boolean` | `isPasterMirrored()` Gets whether the sticker is flipped.
    `boolean` | `isRevert()` Gets whether effects can be rolled back.
    `boolean` | `isTextHasStroke()` Gets whether text is stroked.
    `int` | `removePaster()` Deprecated.
    `void` | `setEffect(EffectBase effect)` Sets the effect.
    `void` | `setOnlyApplyUI(boolean applyUI)` Sets whether the parameter is only applied to the UI layer.
    `void` | `setPasterDuration(long duration)` Sets the display duration of the sticker.
    `void` | `setPasterDuration(long duration, java.util.concurrent.TimeUnit timeUnit)` Sets the display duration of the sticker.
    `void` | `setPasterStartTime(long start)` Sets the time when the sticker is set to visible.
    `void` | `setPasterStartTime(long start, java.util.concurrent.TimeUnit timeUnit)` Sets the time when the sticker is set to visible.
    `void` | `setPasterView(AliyunPasterBaseView pasterView)` Sets the method to render stickers and captions in the UI layer.
    `void` | `setRevert(boolean isRevert)` Sets whether effects can be rolled back.

    - ### Methods inherited from interface com.aliyun.svideosdk.editor.AliyunIPasterController

      `getDuration, getDuration, getPosition, getRotate, getSize, getStartTime, getStartTime, getType, setDuration, setDuration, setPosition, setRotate, setStartTime, setStartTime`

- - ### Method Detail

    - #### setPasterView

          void setPasterView(AliyunPasterBaseView pasterView)

      Sets the method to render stickers and captions in the UI layer.
      Parameters:
        `pasterView` -

    - #### getText

          java.lang.String getText()

      Gets the text contents. This method is only applicable to captions.

    - #### getTextColor

          int getTextColor()

      Gets the text color. This method is only applicable to captions.

    - #### getConfigTextColor

          int getConfigTextColor()

      Gets the text color set in the configuration file. This method is only applicable to captions.

    - #### getConfigTextStrokeColor

          int getConfigTextStrokeColor()

      Gets the text stroke color set in the configuration file. This method is only applicable to captions.

    - #### getTextStrokeColor

          int getTextStrokeColor()

      Gets the text stroke color. This method is only applicable to captions.

    - #### isTextHasStroke

          boolean isTextHasStroke()

      Gets whether text is stroked. This method is only applicable to captions.

    - #### getTextBgLabelColor

          int getTextBgLabelColor()

      Gets the background color of text. This method is only applicable to captions.

    - #### getPasterCenterY

          float getPasterCenterY()

      Gets the y coordinate of the centroid of the sticker in the screen coordinate system.

    - #### getPasterCenterX

          float getPasterCenterX()

      Gets the x coordinate of the centroid of the sticker in the screen coordinate system.

    - #### getPasterWidth

          int getPasterWidth()

      Gets the width of the sticker in the screen coordinate system.

    - #### getPasterHeight

          int getPasterHeight()

      Gets the height of the sticker in the screen coordinate system.

    - #### getPasterRotation

          float getPasterRotation()

      Gets the rotation angle of the sticker.

    - #### getPasterTextOffsetX

          int getPasterTextOffsetX()

      Gets the horizontal offset of the text. This method is only applicable to animated captions.

    - #### getPasterTextOffsetY

          int getPasterTextOffsetY()

      Gets the vertical offset of the text. This method is only applicable to animated captions.

    - #### getPasterTextWidth

          int getPasterTextWidth()

      Gets the text width of an animated caption.

    - #### getPasterTextHeight

          int getPasterTextHeight()

      Gets the text height of an animated caption.

    - #### getPasterTextRotation

          float getPasterTextRotation()

      Gets the text rotation angle of an animated caption.
      Returns:
        The text rotation angle in radians.

    - #### getPasterTextFont

          @Deprecated
          java.lang.String getPasterTextFont()

      Deprecated. Replaced by `getPasterTextFontSource()`.
      Gets the text font of an standard caption.
      Returns:
        The path to the text font.

    - #### getPasterTextFontSource

          Source getPasterTextFontSource()

      Gets the text font of an standard caption.
      Returns:
        The path to the text font.

    - #### editStart

          void editStart()

      The callback that is used to stop the rendering of stickers when editing is started in the UI layer.

    - #### editCompleted

          int editCompleted()

      The callback that is used to render stickers based on the settings in the UI layer after editing is complete.

    - #### removePaster

          @Deprecated
          int removePaster()

      Deprecated.
      Removes a sticker.
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### isPasterExists

          boolean isPasterExists()

      Gets whether the sticker file exists.

    - #### setPasterStartTime

          void setPasterStartTime(long start)

      Sets the time when the sticker is set to visible.
      Parameters:
        `start` - Unit: microseconds.

    - #### setPasterStartTime

          void setPasterStartTime(long start,
                                  java.util.concurrent.TimeUnit timeUnit)

      Sets the time when the sticker is set to visible.

      Added in v3.27.0

      Parameters:
        `start` -
        `timeUnit` - Time Unit

    - #### setPasterDuration

          void setPasterDuration(long duration)

      Sets the display duration of the sticker.
      Parameters:
        `duration` - Unit: microseconds.

    - #### setPasterDuration

          void setPasterDuration(long duration,
                                 java.util.concurrent.TimeUnit timeUnit)

      Sets the display duration of the sticker.

      Added in v3.27.0

      Parameters:
        `duration` -
        `timeUnit` - Time Unit

    - #### getPasterStartTime

          long getPasterStartTime()

      Gets the time when the sticker is set to visible. Unit: microseconds.

    - #### getPasterStartTime

          long getPasterStartTime(java.util.concurrent.TimeUnit timeUnit)

      Gets the time when the sticker is set to visible.

      Added in v3.27.0

      Parameters:
        `timeUnit` - Time Unit
      Returns:
        The display start time of the sticker.

    - #### getPasterDuration

          long getPasterDuration()

      Gets the display duration of the sticker.
      Returns:
        The display duration of the sticker. Unit: microseconds.

    - #### getPasterDuration

          long getPasterDuration(java.util.concurrent.TimeUnit timeUnit)

      Gets the display duration of the sticker.

      Added in v3.27.0

      Parameters:
        `timeUnit` - Time Unit
      Returns:
        The display duration of the sticker. Unit: milliseconds.

    - #### getPasterIconPath

          java.lang.String getPasterIconPath()

      Gets the path to the icon of the sticker. The icon is usually displayed in the UI layer and the key frame of the sticker.
      Returns:
        The path to the icon of the sticker.

    - #### createPasterPlayer

          AnimPlayerView createPasterPlayer(TextureView view)

      Creates a player to preview stickers.
      Parameters:
        `view` -

    - #### getPasterType

          int getPasterType()

      Gets the sticker type.
      Returns:
        The sticker type.
      See Also:
        `EffectPaster.PASTER_TYPE_GIF`, `EffectPaster.PASTER_TYPE_TEXT`, `EffectPaster.PASTER_TYPE_CAPTION`

    - #### isPasterMirrored

          boolean isPasterMirrored()

      Gets whether the sticker is flipped.
      Returns:
        A value of true indicates yes and a value of false indicates no.

    - #### getEffect

          EffectBase getEffect()

      Gets the current effect.

    - #### setEffect

          void setEffect(EffectBase effect)

      Sets the effect.

    - #### setOnlyApplyUI

          void setOnlyApplyUI(boolean applyUI)

      Sets whether the parameter is only applied to the UI layer.
      Parameters:
        `applyUI` -

    - #### isOnlyApplyUI

          boolean isOnlyApplyUI()

      Gets whether the parameter is only applied to the UI layer.

    - #### setRevert

          void setRevert(boolean isRevert)

      Sets whether effects can be rolled back.
      Parameters:
        `isRevert` -

    - #### isRevert

          boolean isRevert()

      Gets whether effects can be rolled back.