com.aliyun.svideosdk.common.struct.effect

## Class EffectPaster

- java.lang.Object
- - com.aliyun.svideosdk.common.struct.effect.EffectBase
  - - com.aliyun.svideosdk.common.struct.effect.EffectPaster

- Direct Known Subclasses:
    EffectText

      public class EffectPaster
      extends EffectBase

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `ActionBase` | `action` Action Animation
    `int` | `displayHeight` The display height corresponding to the current data
    `int` | `displayWidth` The display width corresponding to the current data
    `long` | `duration` The duration of this sticker file.
    `long` | `end` The preset time when this sticker disappears.
    `java.util.List<Frame>` | `frameArry` The frames of this sticker.
    `int` | `height` The height of this sticker.
    `boolean` | `isTrack` Whether to track the movements of human faces.
    `int` | `kernelFrame` Deprecated.
    `boolean` | `mirror` Whether this sticker is flipped.
    `java.lang.String` | `name` The resource name.
    `static int` | `PASTER_TYPE_CAPTION` Animated caption.
    `static int` | `PASTER_TYPE_GIF` Normal sticker.
    `static int` | `PASTER_TYPE_IMAGE` Image
    `static int` | `PASTER_TYPE_TEXT` Deprecated.
    `float` | `rotation` The rotation angle of this sticker.
    `long` | `start` The preset time when this sticker appears.
    `java.util.List<FrameTime>` | `timeArry` The timestamps.
    `int` | `width` The width of this sticker.
    `float` | `x` The x coordinate of the centroid of this sticker.
    `float` | `y` The y coordinate of the centroid of this sticker.

    - ### Fields inherited from class com.aliyun.svideosdk.common.struct.effect.EffectBase

      `mSource, resId, viewId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EffectPaster(Source source)`
    `EffectPaster(java.lang.String path)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `copy(EffectBase base)` Gets a copy of the parameters of an object.
    `boolean` | `equals(java.lang.Object obj)`
    `float` | `getHeightRatio()` Gets the height of this sticker relative to the screen resolution.
    `int` | `getPasterType()`
    `float` | `getWidthRatio()` Gets the width of this sticker relative to the screen resolution.
    `float` | `getXRatio()` Gets the x coordinate of the centroid of this sticker relative to the screen resolution.
    `float` | `getYRatio()` Gets the y coordinate of the centroid of this sticker relative to the screen resolution.
    `void` | `setHeightRatio(float heightRatio)` Sets the height of this sticker relative to the screen resolution.
    `void` | `setWidthRatio(float widthRatio)` Sets the width of this sticker relative to the screen resolution.
    `void` | `setXRatio(float xRatio)` Sets the x coordinate of the centroid of this sticker relative to the screen resolution.
    `void` | `setYRatio(float yRatio)` Sets the y coordinate of the centroid of this sticker relative to the screen resolution.
    `EffectSticker` | `toEffectSticker()` Transform to `EffectSticker` bean
    `java.lang.String` | `toString()`

    - ### Methods inherited from class com.aliyun.svideosdk.common.struct.effect.EffectBase

      `checkIsInvalid, getPath, getResId, getSource, getViewId, readString, setPath, setResId, setSource, setViewId`

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

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

- - ### Field Detail

    - #### PASTER_TYPE_GIF

          public static final int PASTER_TYPE_GIF

      Normal sticker.
      See Also:
        Constant Field Values

    - #### PASTER_TYPE_TEXT

          @Deprecated
          public static final int PASTER_TYPE_TEXT

      Deprecated.
      Standard caption. @Deprecated use`PASTER_TYPE_CAPTION` instead
      See Also:
        Constant Field Values

    - #### PASTER_TYPE_CAPTION

          public static final int PASTER_TYPE_CAPTION

      Animated caption.
      See Also:
        Constant Field Values

    - #### PASTER_TYPE_IMAGE

          public static final int PASTER_TYPE_IMAGE

      Image
      See Also:
        Constant Field Values

    - #### name

          public java.lang.String name

      The resource name.

    - #### width

          public int width

      The width of this sticker.

    - #### height

          public int height

      The height of this sticker.

    - #### start

          public long start

      The preset time when this sticker appears.

    - #### end

          public long end

      The preset time when this sticker disappears.

    - #### y

          public float y

      The y coordinate of the centroid of this sticker.

    - #### x

          public float x

      The x coordinate of the centroid of this sticker.

    - #### displayWidth

          public int displayWidth

      The display width corresponding to the current data

    - #### displayHeight

          public int displayHeight

      The display height corresponding to the current data

    - #### rotation

          public float rotation

      The rotation angle of this sticker. default 0 from -PI to PI;

    - #### duration

          public long duration

      The duration of this sticker file.

    - #### kernelFrame

          @Deprecated
          public int kernelFrame

      Deprecated.

    - #### frameArry

          public java.util.List<Frame> frameArry

      The frames of this sticker.

    - #### timeArry

          public java.util.List<FrameTime> timeArry

      The timestamps.

    - #### mirror

          public boolean mirror

      Whether this sticker is flipped.

    - #### isTrack

          public boolean isTrack

      Whether to track the movements of human faces. This parameter must be set to false for normal stickers.

    - #### action

          public ActionBase action

      Action Animation

  - ### Constructor Detail

    - #### EffectPaster

          @Deprecated
          public EffectPaster(java.lang.String path)

      Deprecated.

    - #### EffectPaster

          public EffectPaster(Source source)

  - ### Method Detail

    - #### getPasterType

          public int getPasterType()

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### getXRatio

          public float getXRatio()

      Gets the x coordinate of the centroid of this sticker relative to the screen resolution.
      Returns:
        The x coordinate. Valid values: [0, 1]

    - #### setXRatio

          public void setXRatio(float xRatio)

      Sets the x coordinate of the centroid of this sticker relative to the screen resolution.
      Parameters:
        `xRatio` - The x coordinate. Valid values: [0, 1]

    - #### getYRatio

          public float getYRatio()

      Gets the y coordinate of the centroid of this sticker relative to the screen resolution.
      Returns:
        The y coordinate. Valid values: [0, 1]

    - #### setYRatio

          public void setYRatio(float yRatio)

      Sets the y coordinate of the centroid of this sticker relative to the screen resolution.
      Parameters:
        `yRatio` - The y coordinate. Valid values: [0, 1]

    - #### getWidthRatio

          public float getWidthRatio()

      Gets the width of this sticker relative to the screen resolution.
      Returns:
        The width of this sticker. Valid values: [0, 1]

    - #### setWidthRatio

          public void setWidthRatio(float widthRatio)

      Sets the width of this sticker relative to the screen resolution.
      Parameters:
        `widthRatio` - The width. Valid values: [0, 1]

    - #### getHeightRatio

          public float getHeightRatio()

      Gets the height of this sticker relative to the screen resolution.
      Returns:
        The height of this sticker. Valid values: [0, 1]

    - #### setHeightRatio

          public void setHeightRatio(float heightRatio)

      Sets the height of this sticker relative to the screen resolution.
      Parameters:
        `heightRatio` - The height. Valid values: [0, 1]

    - #### copy

          public void copy(EffectBase base)

      Description copied from class: `EffectBase`
      Gets a copy of the parameters of an object.
      Overrides:
        `copy` in class `EffectBase`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `EffectBase`

    - #### toEffectSticker

          public EffectSticker toEffectSticker()

      Transform to `EffectSticker` bean

      Added in v3.27.0

      Returns:
      See Also:
        `EffectSticker`