Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CanvasVexFlowBackend

Hierarchy

Index

Properties

Protected canvas

canvas: HTMLElement

Private ctx

ctx: CanvasContext

Protected inner

inner: HTMLElement

Protected renderer

renderer: Renderer

Accessors

CanvasRenderingCtx

  • get CanvasRenderingCtx(): CanvasRenderingContext2D

Methods

clear

  • clear(): void

getBackendType

  • getBackendType(): number

getCanvas

  • getCanvas(): HTMLElement

getContext

  • getContext(): CanvasContext

getInnerElement

  • getInnerElement(): HTMLElement

getRenderer

  • getRenderer(): Renderer

initialize

  • initialize(container: HTMLElement): void

initializeHeadless

  • initializeHeadless(width?: number, height?: number): void
  • Initialize a canvas without attaching it to a DOM node. Can be used to draw in background

    Parameters

    • Default value width: number = 300

      Width of the canvas

    • Default value height: number = 300

      Height of the canvas

    Returns void

renderCurve

renderLine

  • renderLine(start: PointF2D, stop: PointF2D, color?: string, lineWidth?: number): void

renderRectangle

  • renderRectangle(rectangle: RectangleF2D, styleId: number, alpha?: number): void

renderText

  • renderText(fontHeight: number, fontStyle: FontStyles, font: Fonts, text: string, heightInPixel: number, screenPosition: PointF2D, color?: string): void

resize

  • resize(x: number, y: number): void

scale

  • scale(k: number): void

translate

  • translate(x: number, y: number): void

Generated using TypeDoc