Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LineHelper

This helper makes it easier to draw lines

Hierarchy

  • LineHelper

Index

Methods

Static Private calculateTextPos

  • calculateTextPos(ctx: CanvasRenderingContext2D, flip: boolean, length: number, position: number): void
  • Parameters

    • ctx: CanvasRenderingContext2D
    • flip: boolean
    • length: number
    • position: number

    Returns void

Static Private createLineContext

  • createLineContext(ctx: CanvasRenderingContext2D, line: Line): void

Static Private drawBallTip

  • drawBallTip(ctx: CanvasRenderingContext2D, style: any): number

Static Private drawDiamondTip

  • drawDiamondTip(ctx: CanvasRenderingContext2D, style: any): number

Static drawLine

Static Private drawLineTip

  • drawLineTip(ctx: CanvasRenderingContext2D, tip: LineTip): number
  • Draws a line tip on the canvas and returns the tip's width

    Parameters

    • ctx: CanvasRenderingContext2D
    • tip: LineTip

    Returns number

Static Private drawTriangleTip

  • drawTriangleTip(ctx: CanvasRenderingContext2D, style: any): number

Static labelLine

  • labelLine(ctx: CanvasRenderingContext2D, line: Line, font: Font, label: string, position: number, usePdfFix?: boolean): void
  • Labels a given line

    Parameters

    • ctx: CanvasRenderingContext2D
    • line: Line
    • font: Font
    • label: string
    • position: number
    • Default value usePdfFix: boolean = false

    Returns void

Generated using TypeDoc