Options
All
  • Public
  • Public/Protected
  • All
Menu

The class for image elements.

Hierarchy

Index

Constructors

constructor

  • new Image(name: string, source: string, maxWidth?: string | number, maxHeight?: string | number, altText?: string, wrapText?: string, rotation?: number, transparency?: string | number, url?: string, width?: string | number, height?: string | number): Image
  • Parameters

    • name: string

      The name of the image element.

    • source: string

      The source for the image: base64 or URL.

    • Optional maxWidth: string | number

      The maximum width of the image (for proportional scaling).

    • Optional maxHeight: string | number

      The maximum height of the image (for proportional scaling).

    • Optional altText: string

      The alternative text for the image, used when the image can't be loaded.

    • Optional wrapText: string

      The wrapping mode of the text around the image. The options are: In line with text: This option is the default. If no wrap option specified images will wrapped in line with text; Square : In order to use this property, wrap option should be "square"; Top and Bottom : In order to use this property, wrap option should be "top-bottom"; Behind Text : In order to use this property, wrap option should be "behind"; In Front of Text : In order to use this property, wrap option should be "front".

    • Optional rotation: number

      The rotation of the image in degrees.

    • Optional transparency: string | number

      The transparency of the image in percent.

    • Optional url: string

      The URL to load when the image is clicked.

    • Optional width: string | number

      The width of the image (for non-proportional scaling).

    • Optional height: string | number

      The height of the image (for non-proportional scaling).

    Returns Image

Properties

altText

altText: undefined | string

height

height: undefined | string | number

maxHeight

maxHeight: undefined | string | number

maxWidth

maxWidth: undefined | string | number

name

name: string

rotation

rotation: undefined | number

source

source: string

transparency

transparency: undefined | string | number

url

url: undefined | string

width

width: undefined | string | number

wrapText

wrapText: undefined | string

Methods

asDict

  • asDict(): {}
  • The cloud access token as a dict, for building the JSON.

    Returns {}

    dict representation for this cloud access token

    • [key: string]: string | number

asDictSuffixes

  • asDictSuffixes(): {}
  • Get the dict representation of the suffixes that need to be appended to the name of this property in this object's dict representation.

    Returns {}

    the dict representation of the suffixes that need to be appended to the name of this property in this object's dict representation

    • [key: string]: string | number

availableTags

  • availableTags(): Set<string>

Static fromBase64

  • fromBase64(name: string, base64str: string, maxWidth?: string | number, maxHeight?: string | number, altText?: string, wrapText?: string, rotation?: number, transparency?: string | number, url?: string, width?: string | number, height?: string | number): Image
  • Generate an Image object from a base64 string.

    Parameters

    • name: string

      The name of the image element.

    • base64str: string
    • Optional maxWidth: string | number

      The maximum width of the image (for proportional scaling).

    • Optional maxHeight: string | number

      The maximum height of the image (for proportional scaling).

    • Optional altText: string

      The alternative text for the image, used when the image can't be loaded.

    • Optional wrapText: string

      The wrapping mode of the text around the image. The options are: In line with text: This option is the default. If no wrap option specified images will wrapped in line with text; Square : In order to use this property, wrap option should be "square"; Top and Bottom : In order to use this property, wrap option should be "top-bottom"; Behind Text : In order to use this property, wrap option should be "behind"; In Front of Text : In order to use this property, wrap option should be "front".

    • Optional rotation: number

      The rotation of the image in degrees.

    • Optional transparency: string | number

      The transparency of the image in percent.

    • Optional url: string

      The URL to load when the image is clicked.

    • Optional width: string | number

      The width of the image (for non-proportional scaling).

    • Optional height: string | number

      The height of the image (for non-proportional scaling).

    Returns Image

    the generated Image object from a base64 string

Static fromFile

  • fromFile(name: string, path: string, maxWidth?: string | number, maxHeight?: string | number, altText?: string, wrapText?: string, rotation?: number, transparency?: string | number, url?: string, width?: string | number, height?: string | number): Image
  • Generate an Image object from a local file.

    Parameters

    • name: string

      The name of the image element.

    • path: string
    • Optional maxWidth: string | number

      The maximum width of the image (for proportional scaling).

    • Optional maxHeight: string | number

      The maximum height of the image (for proportional scaling).

    • Optional altText: string

      The alternative text for the image, used when the image can't be loaded.

    • Optional wrapText: string

      The wrapping mode of the text around the image. The options are: In line with text: This option is the default. If no wrap option specified images will wrapped in line with text; Square : In order to use this property, wrap option should be "square"; Top and Bottom : In order to use this property, wrap option should be "top-bottom"; Behind Text : In order to use this property, wrap option should be "behind"; In Front of Text : In order to use this property, wrap option should be "front".

    • Optional rotation: number

      The rotation of the image in degrees.

    • Optional transparency: string | number

      The transparency of the image in percent.

    • Optional url: string

      The URL to load when the image is clicked.

    • Optional width: string | number

      The width of the image (for non-proportional scaling).

    • Optional height: string | number

      The height of the image (for non-proportional scaling).

    Returns Image

    the generated Image object from a local file

Static fromRaw

  • fromRaw(name: string, data: Buffer, maxWidth?: string | number, maxHeight?: string | number, altText?: string, wrapText?: string, rotation?: number, transparency?: string | number, url?: string, width?: string | number, height?: string | number): Image
  • Generate an Image object from raw data.

    Parameters

    • name: string

      The name of the image element.

    • data: Buffer
    • Optional maxWidth: string | number

      The maximum width of the image (for proportional scaling).

    • Optional maxHeight: string | number

      The maximum height of the image (for proportional scaling).

    • Optional altText: string

      The alternative text for the image, used when the image can't be loaded.

    • Optional wrapText: string

      The wrapping mode of the text around the image. The options are: In line with text: This option is the default. If no wrap option specified images will wrapped in line with text; Square : In order to use this property, wrap option should be "square"; Top and Bottom : In order to use this property, wrap option should be "top-bottom"; Behind Text : In order to use this property, wrap option should be "behind"; In Front of Text : In order to use this property, wrap option should be "front".

    • Optional rotation: number

      The rotation of the image in degrees.

    • Optional transparency: string | number

      The transparency of the image in percent.

    • Optional url: string

      The URL to load when the image is clicked.

    • Optional width: string | number

      The width of the image (for non-proportional scaling).

    • Optional height: string | number

      The height of the image (for non-proportional scaling).

    Returns Image

    the generated Image object from raw data

Static fromUrl

  • fromUrl(name: string, urlSource: string, maxWidth?: string | number, maxHeight?: string | number, altText?: string, wrapText?: string, rotation?: number, transparency?: string | number, url?: string, width?: string | number, height?: string | number): Image
  • Generate an Image object from a URL.

    Parameters

    • name: string

      The name of the image element.

    • urlSource: string

      The source for the image: base64 or URL.

    • Optional maxWidth: string | number

      The maximum width of the image (for proportional scaling).

    • Optional maxHeight: string | number

      The maximum height of the image (for proportional scaling).

    • Optional altText: string

      The alternative text for the image, used when the image can't be loaded.

    • Optional wrapText: string

      The wrapping mode of the text around the image. The options are: In line with text: This option is the default. If no wrap option specified images will wrapped in line with text; Square : In order to use this property, wrap option should be "square"; Top and Bottom : In order to use this property, wrap option should be "top-bottom"; Behind Text : In order to use this property, wrap option should be "behind"; In Front of Text : In order to use this property, wrap option should be "front".

    • Optional rotation: number

      The rotation of the image in degrees.

    • Optional transparency: string | number

      The transparency of the image in percent.

    • Optional url: string

      The URL to load when the image is clicked.

    • Optional width: string | number

      The width of the image (for non-proportional scaling).

    • Optional height: string | number

      The height of the image (for non-proportional scaling).

    Returns Image

    the generated Image object from a URL

Generated using TypeDoc