Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly canvasId

canvasId: string

The id of the canvas of the calling surface. Used to allow this to call a redraw

doDraw

doDraw: boolean = false

Readonly viewportSize

viewportSize: Size

Gets the current viewport Size

Static Readonly webGlResourcesRefs

webGlResourcesRefs: Set<ICacheable> = new Set<ICacheable>()

Should store references to all cached WebGlResources ICacheable Is used to invalidate the resources when the WebGL context is lost.

Methods

createPen

  • createPen(stroke: string, strokeThickness: number, strokeDashArray?: number[], antiAliased?: boolean): IPen2D
  • description

    creates a pen (which you should cache) from the provided stroke and strokeThickness

    Parameters

    • stroke: string

      in hex format e.g. #FF6600 or CSS rgba format rgb(255,70,30,0.8)

    • strokeThickness: number

      in pixels

    • Default value strokeDashArray: number[] = []
    • Default value antiAliased: boolean = true

      true if the pen draws an Anti-Aliased linez

    Returns IPen2D

createSolidBrush

  • createSolidBrush(fill: string, opacity?: number): IBrush2D
  • description

    creates a solid color brush (which you should cache) from the provided fillColor and opacity

    Parameters

    • fill: string

      color in hex format, e.g. #FF6600 or CSS rgba format rgb(255,70,30,0.8)

    • Optional opacity: number

      from 0.0 to 1.0

    Returns IBrush2D

delete

  • delete(): void
  • Deletes native (WebAssembly) memory used by this type, after which it cannot be used.

    remarks

    Call .delete() before finishing with the object to ensure that WebAssmembly memory leaks do not occur.

    All elements within SciChart's High Performance Realtime JavaScript Charts which implement IDeletable must be deleted manually to free native (WebAssembly) memory

    Returns void

drawLayers

  • drawLayers(): void

drawLine

  • drawLine(x1: number, y1: number, x2: number, y2: number, pen: IPen2D, viewRect: Rect): void
  • description

    Draws a single line from (x1,y1) to (x2,y2) with the specified Pen

    Parameters

    • x1: number

      The X1 coordinate in pixels

    • y1: number

      The Y1 coordinate in pixels

    • x2: number

      The X2 coordinate in pixels

    • y2: number

      The Y2 coordinate in pixels

    • pen: IPen2D

      the pen to draw with

    • viewRect: Rect

      the series viewRect, used for translate and clipping

    Returns void

drawLines

  • description

    Draws a polyline with the specified Pen

    Parameters

    • xyValues: number[]

      An array of x,y points arranged as x0y0 x1y1 ... xnyn

    • strokePen: IPen2D

      the pen to draw with

    • viewRect: Rect

      the series viewRect, used for translate and clipping

    • Default value lineDrawMode: ELineDrawMode = ELineDrawMode.PolyLine

      whether to draw lines as a polyline, or disconnected lines

    Returns void

drawLinesNative

  • drawLinesNative(vertices: VectorColorVertex, pen: SCRTPen, lineDrawMode: ELineDrawMode, left?: number, top?: number): void
  • Draw lines: grid lines, etc.

    Parameters

    • vertices: VectorColorVertex
    • pen: SCRTPen
    • lineDrawMode: ELineDrawMode
    • Default value left: number = 0

      offset in pixels from left, typically used for axes

    • Default value top: number = 0

      offset in pixels from top, typically used for axes

    Returns void

drawRect

  • description

    Draws a Rect with optional fill and stroke

    Parameters

    • rect: Rect

      the Rect dimensions to draw

    • viewRect: Rect

      the series viewRect, used for translate and clipping

    • Optional strokePen: IPen2D

      the stroke pen to draw the outline with

    • Optional fillBrush: IBrush2D

      the fill brush to draw the fill with

    Returns void

drawRects

  • drawRects(vertices: VectorRectVertex, brush: SCRTBrush, left?: number, top?: number): void
  • Draw rectangles: grid bands, etc.

    Parameters

    • vertices: VectorRectVertex
    • brush: SCRTBrush
    • Default value left: number = 0

      offset in pixels from left, typically used for axes

    • Default value top: number = 0

      offset in pixels from top, typically used for axes

    Returns void

endFonts

  • endFonts(force?: boolean): void
  • Parameters

    • Default value force: boolean = false

    Returns void

enqueueLayeredDraw

  • enqueueLayeredDraw(drawFunction: TDrawFunction, layer?: number): void

getFont

  • getFont(labelStyle: TTextStyle, advanced?: boolean, drawEarly?: boolean): SCRTFont
  • Get a native font. Fonts are cached and shared within webassembly so there is no need to cache them in JS. Set advanced: true if you are planning to rotate or scale the text. Set drawEarly: true if you are planning to call font.End() early. Otherwise all native text will be drawn at the end of the render cycle.

    Parameters

    • labelStyle: TTextStyle
    • Default value advanced: boolean = false
    • Default value drawEarly: boolean = false

    Returns SCRTFont

getNativeContext

  • getNativeContext(): SCRTRenderContext
  • Get the native {@link SCRTRenderContext} for direct access to SciChart's WebAssembly Visual Xccelerator engine

    Returns SCRTRenderContext

popShaderEffect

  • popShaderEffect(): void
  • Pops a ShaderEffect from the rendering pipeline. Call {@link WebGL2RenderingContext.pushShaderEffect} to apply an effect

    Returns void

printBlendMode

  • printBlendMode(): void

pushShaderEffect

  • Applies a ShaderEffect to the rendering pipeline. Calling {@link WebGL2RenderingContext.popShaderEffect} pops the effect from the stack reverting to normal drawing

    Parameters

    Returns void

Generated using TypeDoc