Hierarchy

  • Graphics

Methods

  • Draws text on the position specified

    Parameters

    • pos: Vector2

      The position to draw the text

    • text: string

      The text to draw

    • size: number

      The size of the text in pixels

    • color: Color

      The color of the text

    Returns void

  • A full verison of drawText, where you can specify the bounds of the text and the alignment

    Parameters

    • area: Rect

      The place to render the text

    • text: string

      The text to render

    • size: number

      The size of the text

    • color: Color

      The color of the text

    • alignment: TextAlignment

      The horizontal alignment

    • verticalAlignment: VerticalAlignment

      The vertical alignment

    Returns void

  • Draws a texture.

    Parameters

    • texture: Texture

      The texture to draw

    • pos: Vector2

      The position to draw the texture

    • sizeX: number

      The size of the texture in pixels

    • sizeY: number

      The size of the texture in pixels

    • Optional color: Color

      The overlay color of the texture (defaults to white)

    Returns void

  • Parameters

    • renderer: "dx" | "minecraft"

      "dx": uses Direct2D/DirectWrite, "minecraft": use the Minecraft renderer

    Returns void

Generated using TypeDoc