Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PngPongImageCopyTransformer

A transformer to copy one or more sections of an image onto another.

export
class

PngPongImageCopyTransformer

Hierarchy

  • PngPongImageCopyTransformer

Index

Constructors

Methods

Constructors

constructor

  • Creates an instance of PngPongImageCopyTransformer.

    memberof

    PngPongImageCopyTransformer

    Parameters

    • sourceImage: ArrayBuffer

      the source PNG ArrayBuffer to read from. Must be a PngPong suitable PNG.

    • targetTransformer: PngPong

      the transformer to add this image to.

    Returns PngPongImageCopyTransformer

Methods

copy

  • copy(sourceX: number, sourceY: number, sourceWidth: number, sourceHeight: number, targetX: number, targetY: number, mask?: ColorMaskOptions): void
  • Add a copy operation to the transformer. Must be done before running PngPong.run().

    memberof

    PngPongImageCopyTransformer

    Parameters

    • sourceX: number
    • sourceY: number
    • sourceWidth: number
    • sourceHeight: number
    • targetX: number
    • targetY: number
    • Optional mask: ColorMaskOptions

    Returns void

Generated using TypeDoc