Class PAGImage

Hierarchy

Methods

  • Create pag image from image source or video source. Make sure the target pixel is shown on the screen. Like

    Image.onload = async () => {
    return await PAGImage.fromSource(Image)
    }

    Parameters

    • source: TexImageSource

    Returns PAGImage

  • Creates a PAGImage object from an array of pixel data, return null if it's not valid pixels.

    Parameters

    • pixels: Uint8Array
    • width: number
    • height: number
    • colorType: ColorType
    • alphaType: AlphaType

    Returns PAGImage

  • Creates a PAGImage object from the specified backend texture, return null if the texture is invalid.

    Parameters

    • textureID: number
    • width: number
    • height: number
    • flipY: boolean

    Returns PAGImage

  • Specifies the rule of how to scale the content to fit the image layer's original size. The matrix changes when this method is called.

    Parameters

    Returns void

  • Set the transformation which will be applied to the content. The scaleMode property will be set to PAGScaleMode::None when this method is called.

    Parameters

    Returns void

Constructors

Properties

wasmIns: any
isDestroyed: boolean = false

Generated using TypeDoc