Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Bitmap

Describes an image that can be drawn to a DrawingContext.

Hierarchy

  • Bitmap

Implements

  • Serializable

Index

Constructors

constructor

  • Initializes a new instance of the Bitmap class with the specified data.

    Parameters

    • data: Buffer | HostBinary

      A buffer that contains binary image data. This can either be a binary png- or jpeg-image, or a raw pixel buffer.

    • Optional layout: BitmapDataLayout

      In case the data buffer contains raw pixel data, it's necessary to specify the data layout of the buffer.

    Returns Bitmap

Methods

measure

  • Loads the size and resolution of the image.

    host

    Returns BitmapMeasurements

Private serialize

  • serialize(target: BufferWriter): void
  • Parameters

    • target: BufferWriter

    Returns void

Static loadFromResource

  • Loads a bitmap that is stored in the extension package. The specified path must be relative to the packages output directory, which has been specified with the outDir parameter in the tsconfig.json file.

    Parameters

    • path: string

      The relative path to a bitmap file.

    • Optional layout: BitmapDataLayout

      In case the file contains raw pixel data, it's necessary to specify the data layout of the file.

    Returns Bitmap

Generated using TypeDoc