• Draw a line on canvas context

    Parameters

    • ctx: CanvasRenderingContext2D

      The canvas context

    • color: Color = Color.Red

      The color of the line

    • x1: number

      The start x coordinate

    • y1: number

      The start y coordinate

    • x2: number

      The ending x coordinate

    • y2: number

      The ending y coordinate

    • thickness: number = 1

      The line thickness

    • cap: LineCapStyle = 'butt'

      The LineCapStyle (butt, round, or square)

    Returns void