Skip to main content

DrawTextWrap

Callable

  • DrawTextWrap(Text: string, X: number, Y: number, Width: number, Height: number, ForeColor: string, BackColor?: string, MaxLine?: number, LineSpacing?: number, Alignment?: Center | Top): void

  • Draws a word wrapped text in a rectangle


    Parameters

    • Text: string

      Text to draw

    • X: number

      Position of the rectangle on the X axis

    • Y: number

      Position of the rectangle on the Y axis

    • Width: number

      Width of the rectangle

    • Height: number

      Height of the rectangle

    • ForeColor: string

      Foreground color

    • optionalBackColor: string

      Background color

    • optionalMaxLine: number

      Maximum of lines the word can wrap for

    • LineSpacing: number = 23

      The number of pixels between each lines (default to 23)

    • Alignment: Center | Top = "Center"

      How the text should be alligned w.r.t. the Y position when wrapped over multiple lines

    Returns void

    • Nothing