Class PAGFile

Hierarchy

Methods

  • Load pag file from file.

    Parameters

    • data: ArrayBuffer | File | Blob

    Returns Promise<PAGFile>

  • The maximum tag level current SDK supports.

    Returns number

  • The tag level this pag file requires.

    Returns number

  • The number of replaceable texts.

    Returns number

  • The number of replaceable images.

    Returns number

  • The number of video compositions.

    Returns number

  • Get a text data of the specified index. The index ranges from 0 to numTexts - 1. Note: It always returns the default text data.

    Parameters

    • editableTextIndex: number

    Returns TextDocument

  • Replace the text data of the specified index. The index ranges from 0 to PAGFile.numTexts - 1. Passing in null for the textData parameter will reset it to default text data.

    Parameters

    Returns void

  • Replace the image content of the specified index with a PAGImage object. The index ranges from 0 to PAGFile.numImages - 1. Passing in null for the image parameter will reset it to default image content.

    Parameters

    • editableImageIndex: number
    • pagImage: PAGImage

    Returns void

  • Returns the indices of the editable layers in this PAGFile. If the editableIndex of a PAGLayer is not present in the returned indices, the PAGLayer should not be treated as editable.

    Parameters

    Returns number[]

  • Set the duration of this PAGFile. Passing a value less than or equal to 0 resets the duration to its default value.

    Parameters

    • duration: number

    Returns void

  • Set the duration of this PAGFile. Passing a value less than or equal to 0 resets the duration to its default value.

    Returns PAGFile

  • Changes the position of an existing child layer in the composition. This affects the layering of child layers.

    Parameters

    • pagLayer: PAGLayer

      The child layer for which you want to change the index number.

    • index: number

      The resulting index number for the child layer.

    Returns number

  • Add a PAGLayer to current PAGComposition at the top. If you add a layer that already has a different PAGComposition object as a parent, the layer is removed from the other PAGComposition object.

    Parameters

    Returns boolean

  • Add a PAGLayer to current PAGComposition at the top. If you add a layer that already has a different PAGComposition object as a parent, the layer is removed from the other PAGComposition object.

    Parameters

    Returns boolean

  • A matrix object containing values that alter the scaling, rotation, and translation of the layer. Altering it does not change the animation matrix, and it will be concatenated to current animation matrix for displaying.

    Returns Matrix

  • Set the alpha of the layer, which will be concatenated to the current animation opacity for displaying.

    Parameters

    • opacity: Number

    Returns void

  • Ranges from 0 to PAGFile.numTexts - 1 if the layer type is text, or from 0 to PAGFile.numImages -1 if the layer type is image, otherwise returns -1.

    Returns number

  • Converts the time from the PAGLayer's (local) timeline to the PAGSurface (global) timeline. The time is in microseconds.

    Parameters

    • localTime: number

    Returns number

  • Converts the time from the PAGSurface (global) to the PAGLayer's (local) timeline timeline. The time is in microseconds.

    Parameters

    • globalTime: number

    Returns number

  • The start time of the layer in microseconds, indicates the start position of the visible range in parent composition. It could be negative value.

    Returns number

  • The current time of the layer in microseconds, the layer is invisible if currentTime is not in the visible range (startTime <= currentTime < startTime + duration).

    Returns number

  • Set the progress of play position, the value ranges from 0.0 to 1.0. A value of 0.0 represents the frame at startTime. A value of 1.0 represents the frame at the end of duration.

    Parameters

    • percent: number

    Returns void

  • Indicate whether this layer is excluded from parent's timeline. If set to true, this layer's current time will not change when parent's current time changes.

    Returns boolean

Constructors

Properties

wasmIns: any
isDestroyed: boolean = false

Generated using TypeDoc