Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Text

Implements

Index

Constructors

constructor

  • new Text(caption: string, pos: Point, scale?: number, color?: Color, font?: Font, alignment?: Alignment, dropShadow?: boolean, outline?: boolean, wordWrap?: Size): Text
  • Parameters

    • caption: string

      Text to display

    • pos: Point

      Position of text relative to alignment. In pixels.

    • scale: number = 1

      Size of text. Default 1.0

    • color: Color = Color.white

      Color of text. Default black.

    • font: Font = Font.ChaletLondon

      Font of text. Default Chalet London.

    • alignment: Alignment = Alignment.Left

      Alignment of text. Default Left.

    • dropShadow: boolean = false
    • outline: boolean = false
    • wordWrap: Size = ...

    Returns Text

Properties

alignment

alignment: Alignment

caption

caption: string

color

color: Color

dropShadow

dropShadow: boolean

font

font: Font

outline

outline: boolean

pos

pos: Point

scale

scale: number

wordWrap

wordWrap: Size

Methods

draw

  • draw(offset?: Size, resolution?: Size): void
  • draw(caption: string, pos: Point, scale: number, color?: Color, font?: Font, alignment?: Alignment, dropShadow?: boolean, outline?: boolean, wordWrap?: Size, resolution?: Size): void
  • Parameters

    • Optional offset: Size
    • Optional resolution: Size

    Returns void

  • Parameters

    • caption: string
    • pos: Point
    • scale: number
    • Optional color: Color
    • Optional font: Font
    • Optional alignment: Alignment
    • Optional dropShadow: boolean
    • Optional outline: boolean
    • Optional wordWrap: Size
    • Optional resolution: Size

    Returns void

Static addLongString

  • addLongString(str: string): void

Static draw

  • draw(caption: string, pos: Point, scale?: number, color?: Color, font?: Font, alignment?: Alignment, dropShadow?: boolean, outline?: boolean, wordWrap?: Size, resolution?: Size): void
  • Parameters

    • caption: string
    • pos: Point
    • scale: number = 1
    • color: Color = Color.white
    • font: Font = Font.ChaletLondon
    • alignment: Alignment = Alignment.Left
    • dropShadow: boolean = false
    • outline: boolean = false
    • Optional wordWrap: Size
    • Optional resolution: Size

    Returns void

Generated using TypeDoc