Options
All
  • Public
  • Public/Protected
  • All
Menu

The RenderContext2D provides methods for drawing to an {@link HTMLCanvasElement | Html5 Canvas} This context class is used in SciChart's High Performance Realtime JavaScript Charts to draw shapes, lines, fills, images and more

Hierarchy

  • RenderContext2D

Index

Constructors

Methods

Constructors

constructor

  • Creates an instance of the RenderContext2D

    Parameters

    • canvas2D: HTMLCanvasElement

      the {@link HTMLCanvasElement} we are drawing to

    Returns RenderContext2D

Methods

clear

  • clear(): void
  • Clears the backing canvas element

    Returns void

drawCircle

  • drawCircle(x: number, y: number, radius: number, fillHtmlColor: string): void
  • Draws a circle to the specified location and with provided Htmlcolor string

    Parameters

    • x: number

      the X-location of the rectangle

    • y: number

      the Y-location of the rectangle

    • radius: number

      the radius of the circle

    • fillHtmlColor: string

      the Html color code to fill the circle

    Returns void

drawRect

  • drawRect(x: number, y: number, width: number, height: number, htmlColor?: string): void
  • Draws a rectangle to the specified location and with provided Htmlcolor string

    Parameters

    • x: number

      the X-location of the rectangle

    • y: number

      the Y-location of the rectangle

    • width: number

      the width of the rectangle

    • height: number

      the height of the rectangle

    • Default value htmlColor: string = "rgba(211,211,211,0.5)"

      the Html color code to fill the rectangle

    Returns void

Generated using TypeDoc