Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "module"

Index

Functions

defaultImage

  • defaultImage Generates a png image with the text provided vertically and horizontally aligned to center.

    Parameters

    • Default value text: string = ""

      The Text Used on the Image

    • Optional options: ExpectedConfigObject

      The optional settings for the image

    Returns string

    the png/base64 encoded dataurl to used as an image source

wrapText

  • wrapText(context: CanvasRenderingContext2D, text: string, lineHeight: number): void
  • wrapText takes the incoming text and fits it the context of the image. Nothing is returned as the text value is applied directly to the canvas context.

    Parameters

    • context: CanvasRenderingContext2D

      The Context to Apply Text To

    • text: string

      The Text to be applied to the Context

    • lineHeight: number

      The Line Height Used when breaking the Text value across multiple lines

    Returns void

Generated using TypeDoc