com.aliyun.svideosdk.editor

## Interface AliyunPasterManager

-     public interface AliyunPasterManager

  An interface that is used to create sticker managers, which use rendering methods to display stickers correctly in the UI. To add stickers in the UI, `setDisplaySize(int, int)` must be invoked to specify the size of the display area where the stickers are rendered.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `AliyunPasterControllerCompoundCaption` | `addCaptionWithStartTime(java.lang.String text, Source bubbleEffectSource, Source fontSource, long startTime, long duration)` Adds a standard caption and sets the display duration of the caption.
    `AliyunPasterControllerCompoundCaption` | `addCaptionWithStartTime(java.lang.String text, java.lang.String bubbleEffectPath, java.lang.String font, long startTime, long duration)` Deprecated. Use `addCaptionWithStartTime(String,Source,Source,long,long)` instead.
    `AliyunPasterController` | `addPaster(Source source)` Adds a sticker.
    `AliyunPasterController` | `addPaster(java.lang.String path)` Deprecated. Replaced by `addPaster(Source)`.
    `AliyunPasterController` | `addPasterWithStartTime(Source source, long startTime, long duration)` Adds a sticker and sets the display duration of the sticker.
    `AliyunPasterController` | `addPasterWithStartTime(java.lang.String path, long startTime, long duration)` Deprecated. Replaced by `addPasterWithStartTime(Source,long,long)`.
    `AliyunPasterController` | `addSubtitle(java.lang.String text, Source font)` Deprecated. use `addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)` instead Adds a standard caption. Added in v3.23.0
    `AliyunPasterController` | `addSubtitle(java.lang.String text, java.lang.String font)` Deprecated. use `addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)` instead Adds a standard caption.
    `AliyunPasterController` | `addSubtitleWithStartTime(java.lang.String text, Source font, long startTime, long duration)` Deprecated. use `addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)` instead Adds a standard caption and sets the display duration of the caption. Added in v3.23.0
    `AliyunPasterController` | `addSubtitleWithStartTime(java.lang.String text, java.lang.String font, long startTime, long duration)` Deprecated. use `addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)` instead Adds a standard caption and sets the display duration of the caption.
    `AliyunIPasterController` | `findControllerAtPoint(PointF point, long timeInMills)` Find paster controller at startTime in milliseconds Added in v3.22.0
    `java.util.List<AliyunIPasterController>` | `findControllersByType(int type)` Find paster controller for selected type
    `void` | `remove(AliyunIPasterController aController)` delete aController 贴图控制器
    `void` | `setDisplaySize(int width, int height)` Sets the size of the display area where the sticker is rendered.
    `void` | `setOnPasterRestoreListener(OnPasterRestored listener)` Sets the callback that is used to restore UI settings when a sticker is restored.

- - ### Method Detail

    - #### addPaster

          @Deprecated
          AliyunPasterController addPaster(java.lang.String path)

      Deprecated. Replaced by `addPaster(Source)`.
      Adds a sticker.
      Parameters:
        `path` - The path of the sticker.
      Returns:
        The sticker manager.

    - #### addPaster

          AliyunPasterController addPaster(Source source)

      Adds a sticker.
      Parameters:
        `source` - The path of the sticker.
      Returns:
        The sticker manager.

    - #### addPasterWithStartTime

          @Deprecated
          AliyunPasterController addPasterWithStartTime(java.lang.String path,
                                                                    long startTime,
                                                                    long duration)

      Deprecated. Replaced by `addPasterWithStartTime(Source,long,long)`.
      Adds a sticker and sets the display duration of the sticker.
      Parameters:
        `path` - The path of the sticker.
        `startTime` - The time when the sticker is set to visible.
        `duration` - The display duration of the sticker.
      Returns:
        The sticker manager.

    - #### addPasterWithStartTime

          AliyunPasterController addPasterWithStartTime(Source source,
                                                        long startTime,
                                                        long duration)

      Adds a sticker and sets the display duration of the sticker.
      Parameters:
        `source` - The path of the sticker.
        `startTime` - The time when the sticker is set to visible.
        `duration` - The display duration of the sticker.
      Returns:
        The sticker manager.

    - #### addSubtitle

          @Deprecated
          AliyunPasterController addSubtitle(java.lang.String text,
                                                         java.lang.String font)

      Deprecated. use `addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)` instead Adds a standard caption.
      Parameters:
        `text` - The text contents.
        `font` - The text font.
      Returns:
        The sticker manager.

    - #### addSubtitle

          AliyunPasterController addSubtitle(java.lang.String text,
                                             Source font)

      Deprecated. use `addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)` instead Adds a standard caption. Added in v3.23.0
      Parameters:
        `text` - The text contents.
        `font` - The text font resource.
      Returns:
        The sticker manager.

    - #### addSubtitleWithStartTime

          @Deprecated
          AliyunPasterController addSubtitleWithStartTime(java.lang.String text,
                                                                      java.lang.String font,
                                                                      long startTime,
                                                                      long duration)

      Deprecated. use `addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)` instead Adds a standard caption and sets the display duration of the caption.
      Parameters:
        `text` - The text contents.
        `font` - The text font.
        `startTime` - The time when the caption is set to visible.
        `duration` - The display duration of the caption.
      Returns:
        The sticker manager.

    - #### addSubtitleWithStartTime

          AliyunPasterController addSubtitleWithStartTime(java.lang.String text,
                                                          Source font,
                                                          long startTime,
                                                          long duration)

      Deprecated. use `addCaptionWithStartTime(java.lang.String, java.lang.String, java.lang.String, long, long)` instead Adds a standard caption and sets the display duration of the caption. Added in v3.23.0
      Parameters:
        `text` - The text contents.
        `font` - The text font.
        `startTime` - The time when the caption is set to visible.
        `duration` - The display duration of the caption.
      Returns:
        The sticker manager.

    - #### addCaptionWithStartTime

          AliyunPasterControllerCompoundCaption addCaptionWithStartTime(java.lang.String text,
                                                                        java.lang.String bubbleEffectPath,
                                                                        java.lang.String font,
                                                                        long startTime,
                                                                        long duration)

      Deprecated. Use `addCaptionWithStartTime(String,Source,Source,long,long)` instead.
      Adds a standard caption and sets the display duration of the caption. Added in v3.22.0
      Parameters:
        `text` - The text contents.
        `bubbleEffectPath` - the bubble effect path
        `font` - The text font.
        `startTime` - The time when the caption is set to visible.
        `duration` - The display duration of the caption.
      Returns:
        The sticker manager.

    - #### addCaptionWithStartTime

          AliyunPasterControllerCompoundCaption addCaptionWithStartTime(java.lang.String text,
                                                                        Source bubbleEffectSource,
                                                                        Source fontSource,
                                                                        long startTime,
                                                                        long duration)

      Adds a standard caption and sets the display duration of the caption. Added in v3.23.0
      Parameters:
        `text` - The text contents.
        `bubbleEffectSource` - the bubble effect source
        `fontSource` - The text font source.
        `startTime` - The time when the caption is set to visible.
        `duration` - The display duration of the caption.
      Returns:
        The sticker manager.

    - #### findControllerAtPoint

          AliyunIPasterController findControllerAtPoint(PointF point,
                                                        long timeInMills)

      Find paster controller at startTime in milliseconds Added in v3.22.0
      Parameters:
        `point` - click point between 0 and 1 in pixels
        `showTime` - the caption show time in milliseconds
      Returns:
        PasterController

    - #### findControllersByType

          java.util.List<AliyunIPasterController> findControllersByType(int type)

      Find paster controller for selected type
      Parameters:
        `type` - the paster controller type
      Returns:
        PasterController

    - #### remove

          void remove(AliyunIPasterController aController)

      delete aController 贴图控制器

    - #### setDisplaySize

          void setDisplaySize(int width,
                              int height)

      Sets the size of the display area where the sticker is rendered. The size and position of the sticker in the video are determined by the size and position of the display area. This method must be invoked before `AliyunIEditor.init(SurfaceView, Context)`.
      Parameters:
        `width` -
        `height` -
      Throws:
        `java.lang.IllegalStateException` - if the width or height is set to 0.

    - #### setOnPasterRestoreListener

          void setOnPasterRestoreListener(OnPasterRestored listener)

      Sets the callback that is used to restore UI settings when a sticker is restored. This method must be invoked before `AliyunIEditor.init(SurfaceView, Context)`. Otherwise, effects such as stickers, captions, and doodles cannot be restored.
      Parameters:
        `listener` -