Skip to main content

DynamicDrawTextFromTo

Callable

  • DynamicDrawTextFromTo(text: string, ctx: CanvasRenderingContext2D, from: readonly number[], to: readonly number[], options: DynamicDrawOptions): void

  • Draws the given text in a straight line between the two provided coordinates. If the contain option is specified, the text will be fully contained in the rectangle defined by the from and to positions.


    Parameters

    • text: string

      The text to draw

    • ctx: CanvasRenderingContext2D

      The rendering context to draw the text to

    • from: readonly number[]

      The [x, y] coordinates to start drawing the text at

    • to: readonly number[]

      The [x, y] coordinates to end drawing the text at

    • options: DynamicDrawOptions

      Additional drawing options

    Returns void

    • Nothing