com.aliyun.svideosdk.editor

## Interface AliyunPasterBaseView

-     public interface AliyunPasterBaseView

  An interface that abstracts the views for displaying stickers in the UI layer. Users need to implement this interface and call `AliyunPasterController.setPasterView(AliyunPasterBaseView)` to pass implementations to shortvideo SDK. The SDK then calls the methods in the implementations to render stickers, animated captions, and standard captions.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Bitmap` | `getBackgroundBitmap()` Gets the background image.
    `int` | `getPasterCenterX()` Gets the x coordinate of the centroid of the sticker.
    `int` | `getPasterCenterY()` Gets the y coordinate of the centroid of the sticker.
    `int` | `getPasterHeight()` Gets the height of the sticker.
    `float` | `getPasterRotation()` Gets the rotation angle of the sticker.
    `java.lang.String` | `getPasterTextFont()` Deprecated. Replaced by `getPasterTextFontSource()`.
    `Source` | `getPasterTextFontSource()` Gets the path to the font file.
    `int` | `getPasterTextHeight()` Gets the text height.
    `int` | `getPasterTextOffsetX()` Gets the offset of the text relative to the background sticker on the x coordinate.
    `int` | `getPasterTextOffsetY()` Gets the offset of the text relative to the background sticker on the y coordinate.
    `float` | `getPasterTextRotation()` Gets the text rotation angle.
    `int` | `getPasterTextWidth()` Gets the text width.
    `View` | `getPasterView()` Gets the view that contains the sticker in the UI layer.
    `int` | `getPasterWidth()` Gets the width of the sticker.
    `java.lang.String` | `getText()` Gets the text contents.
    `Layout.Alignment` | `getTextAlign()` Gets the text alignment method.
    `int` | `getTextBgLabelColor()` Gets the background color of the text.
    `int` | `getTextColor()` Gets the text color.
    `int` | `getTextFixSize()` Gets the text size.
    `int` | `getTextMaxLines()` Gets the maximum number of text lines.
    `int` | `getTextPaddingX()` Gets the x coordinate of the text relative to the origin in the upper left corner.
    `int` | `getTextPaddingY()` Gets the y coordinate of the text relative to the origin in the upper left corner.
    `int` | `getTextStrokeColor()` Gets the text stroke color.
    `View` | `getTextView()` Gets the view that contains the caption in the UI layer.
    `boolean` | `isPasterMirrored()` Gets whether to flip the sticker.
    `boolean` | `isTextHasLabel()` Gets whether the text has background color.
    `boolean` | `isTextHasStroke()` Gets whether the text is stroked.
    `Bitmap` | `transToImage()` Converts text to an image.

- - ### Method Detail

    - #### getTextMaxLines

          int getTextMaxLines()

      Gets the maximum number of text lines.

    - #### getTextAlign

          Layout.Alignment getTextAlign()

      Gets the text alignment method.

    - #### getTextPaddingX

          int getTextPaddingX()

      Gets the x coordinate of the text relative to the origin in the upper left corner.

    - #### getTextPaddingY

          int getTextPaddingY()

      Gets the y coordinate of the text relative to the origin in the upper left corner.

    - #### getTextFixSize

          int getTextFixSize()

      Gets the text size.

    - #### getBackgroundBitmap

          Bitmap getBackgroundBitmap()

      Gets the background image.

    - #### getText

          java.lang.String getText()

      Gets the text contents. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### getTextColor

          int getTextColor()

      Gets the text color. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### getTextStrokeColor

          int getTextStrokeColor()

      Gets the text stroke color. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### isTextHasStroke

          boolean isTextHasStroke()

      Gets whether the text is stroked. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### isTextHasLabel

          boolean isTextHasLabel()

      Gets whether the text has background color.

    - #### getTextBgLabelColor

          int getTextBgLabelColor()

      Gets the background color of the text. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### getPasterTextOffsetX

          int getPasterTextOffsetX()

      Gets the offset of the text relative to the background sticker on the x coordinate. This method is only applicable to animated captions. For stickers and standard captions, create an empty implementation.

    - #### getPasterTextOffsetY

          int getPasterTextOffsetY()

      Gets the offset of the text relative to the background sticker on the y coordinate. This method is only applicable to animated captions. For stickers and standard captions, create an empty implementation.

    - #### getPasterTextWidth

          int getPasterTextWidth()

      Gets the text width. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### getPasterTextHeight

          int getPasterTextHeight()

      Gets the text height. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### getPasterTextRotation

          float getPasterTextRotation()

      Gets the text rotation angle. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### getPasterTextFont

          @Deprecated
          java.lang.String getPasterTextFont()

      Deprecated. Replaced by `getPasterTextFontSource()`.
      Gets the path to the font file. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### getPasterTextFontSource

          Source getPasterTextFontSource()

      Gets the path to the font file. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### getPasterWidth

          int getPasterWidth()

      Gets the width of the sticker. For animated captions, gets the width of the background sticker.

    - #### getPasterHeight

          int getPasterHeight()

      Gets the height of the sticker. For animated captions, gets the height of the background sticker.

    - #### getPasterCenterY

          int getPasterCenterY()

      Gets the y coordinate of the centroid of the sticker. For animated captions, gets the y coordinate of the centroid of the background sticker.

    - #### getPasterCenterX

          int getPasterCenterX()

      Gets the x coordinate of the centroid of the sticker. For animated captions, gets the x coordinate of the centroid of the background sticker.

    - #### getPasterRotation

          float getPasterRotation()

      Gets the rotation angle of the sticker. For animated captions, gets the rotation angle of the background sticker.

    - #### transToImage

          Bitmap transToImage()

      Converts text to an image. This method is only applicable to captions. For stickers, create an empty implementation.

    - #### getPasterView

          View getPasterView()

      Gets the view that contains the sticker in the UI layer. The SDK uses this view to control the visibility of the sticker.

    - #### getTextView

          View getTextView()

      Gets the view that contains the caption in the UI layer.

    - #### isPasterMirrored

          boolean isPasterMirrored()

      Gets whether to flip the sticker.