Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • TextRun

Implements

Index

Constructors

constructor

  • new TextRun(text: string, font: null | Font, textAlign: null | CanvasTextAlign, textBaseline: null | CanvasTextBaseline, textOrigin: null | R2Point, textColor: null | Color): TextRun
  • Parameters

    • text: string
    • font: null | Font
    • textAlign: null | CanvasTextAlign
    • textBaseline: null | CanvasTextBaseline
    • textOrigin: null | R2Point
    • textColor: null | Color

    Returns TextRun

Properties

Readonly font

font: null | Font

Readonly text

text: string

Readonly textAlign

textAlign: null | CanvasTextAlign

Readonly textBaseline

textBaseline: null | CanvasTextBaseline

Readonly textColor

textColor: null | Color

Readonly textOrigin

textOrigin: null | R2Point

Methods

Protected copy

  • copy(text: string, font: null | Font, textAlign: null | CanvasTextAlign, textBaseline: null | CanvasTextBaseline, textOrigin: null | R2Point, textColor: null | Color): TextRun
  • Parameters

    • text: string
    • font: null | Font
    • textAlign: null | CanvasTextAlign
    • textBaseline: null | CanvasTextBaseline
    • textOrigin: null | R2Point
    • textColor: null | Color

    Returns TextRun

debug

  • debug(output: Output<unknown>): void
  • Parameters

    Returns void

draw

  • Parameters

    Returns void

equals

  • equals(that: unknown): boolean
  • Parameters

    • that: unknown

    Returns boolean

render

  • Parameters

    Returns void

Protected renderText

  • Parameters

    Returns void

toAny

  • Returns TextRunInit

toString

  • toString(): string
  • Returns string

withFont

  • Parameters

    Returns TextRun

withText

  • Parameters

    • text: string

    Returns TextRun

withTextAlign

  • withTextAlign(textAlign: null | CanvasTextAlign): TextRun
  • Parameters

    • textAlign: null | CanvasTextAlign

    Returns TextRun

withTextBaseline

  • withTextBaseline(textBaseline: null | CanvasTextBaseline): TextRun
  • Parameters

    • textBaseline: null | CanvasTextBaseline

    Returns TextRun

withTextColor

  • Parameters

    Returns TextRun

withTextOrigin

  • Parameters

    Returns null | TextRun

Static create

  • create(text: string, font?: null | AnyFont, textAlign?: null | CanvasTextAlign, textBaseline?: null | CanvasTextBaseline, textOrigin?: null | AnyR2Point, textColor?: null | AnyColor): TextRun
  • Parameters

    • text: string
    • Optional font: null | AnyFont
    • Optional textAlign: null | CanvasTextAlign
    • Optional textBaseline: null | CanvasTextBaseline
    • Optional textOrigin: null | AnyR2Point
    • Optional textColor: null | AnyColor

    Returns TextRun

Static fromAny

  • Parameters

    Returns TextRun

Generated using TypeDoc