Useful functions for creating some commonly used textures.

Constructors

Methods

  • Gets a Texture defintion for a Rounded Rectangle

    The Rounded Rectangle is drawn onto an HTML Canvas, and then rendered by Lightning via a Lightning.textures.StaticCanvasTexture

    Parameters

    • w: number

      Width of rectangle

    • h: number

      Height of rectangle

    • radius: CornerRadius

      Corner radius of rectangle

    • OptionalstrokeWidth: number

      Stroke width of rectangle outline

    • OptionalstrokeColor: number

      Color of rectangle outline

    • Optionalfill: boolean

      true - Fill rectangle with fillColor, false - don't fill rectangle

    • OptionalfillColor: number

      Color to fill the rectangle with (if fill === true)

    Returns Lightning.textures.StaticCanvasTexture.Settings