Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Image

Hierarchy

  • Image

Index

Constructors

constructor

  • Parameters

    • _doc: Document

      document to embed image in

    • Optional data: string | Buffer

      image file path, or image buffer (buffer not yet implemented)

    Returns Image

Properties

Private _doc

_doc: Document

document to embed image in

Private _instance

_instance: any

Methods

getHeight

  • getHeight(): number

getWidth

  • getWidth(): number

isLoaded

  • isLoaded(): boolean

loadFromBuffer

  • loadFromBuffer(data: Buffer | string): void
  • description

    Embeds data as an image on the document. To use this image pass to Painter.drawImage. New instances will reuse embedded img object if passed the same image reference.

    throws

    {TypeError} - throw type error on invalid arguments.

    Parameters

    • data: Buffer | string

      img data

    Returns void

    void

loadFromFile

  • loadFromFile(file: string): void
  • Parameters

    • file: string

    Returns void

setInterpolate

  • setInterpolate(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

Generated using TypeDoc