C# Class Bitmap.PlotSurface2D

Wrapper around NPlot.PlotSurface2D that provides extra functionality specific to drawing to Bitmaps.
Inheritance: IPlotSurface2D
Show file Open project: GridProtectionAlliance/openHistorian

Public Methods

Method Description
Add ( IDrawable p ) : void

Adds a drawable object to the plot surface. If the object is an IPlot, the PlotSurface2D axes will also be updated.

Add ( IDrawable p, int zOrder ) : void

Adds a drawable object to the plot surface. If the object is an IPlot, the PlotSurface2D axes will also be updated.

AddAxesConstraint ( AxesConstraint c ) : void

Add an axis constraint to the plot surface. Axis constraints can specify relative world-pixel scalings, absolute axis positions etc.

Clear ( ) : void

Clears the plot.

Draw ( Graphics g, Rectangle bounds ) : void

Renders the plot.

PlotSurface2D ( System b ) : System.Collections.Generic

Constructor.

PlotSurface2D ( int width, int height ) : System.Collections.Generic

Constructor.

Refresh ( ) : void

Refreshes (draws) the plot.

Remove ( IDrawable p, bool updateAxes ) : void

Remove a drawable object from the plot surface.

ToStream ( ImageFormat imageFormat ) : MemoryStream

Renders the bitmap to a MemoryStream. Useful for returning the bitmap from an ASP.NET page.

Method Details

Add() public method

Adds a drawable object to the plot surface. If the object is an IPlot, the PlotSurface2D axes will also be updated.
public Add ( IDrawable p ) : void
p IDrawable The IDrawable object to add to the plot surface.
return void

Add() public method

Adds a drawable object to the plot surface. If the object is an IPlot, the PlotSurface2D axes will also be updated.
public Add ( IDrawable p, int zOrder ) : void
p IDrawable The IDrawable object to add to the plot surface.
zOrder int The z-ordering when drawing (objects with lower numbers are drawn first)
return void

AddAxesConstraint() public method

Add an axis constraint to the plot surface. Axis constraints can specify relative world-pixel scalings, absolute axis positions etc.
public AddAxesConstraint ( AxesConstraint c ) : void
c AxesConstraint The axis constraint to add.
return void

Clear() public method

Clears the plot.
public Clear ( ) : void
return void

Draw() public method

Renders the plot.
public Draw ( Graphics g, Rectangle bounds ) : void
g Graphics The graphics surface.
bounds Rectangle The rectangle storing the bounds for rendering.
return void

PlotSurface2D() public method

Constructor.
public PlotSurface2D ( System b ) : System.Collections.Generic
b System The Bitmap where the plot is to be rendered.
return System.Collections.Generic

PlotSurface2D() public method

Constructor.
public PlotSurface2D ( int width, int height ) : System.Collections.Generic
width int width of the bitmap.
height int height of the bitmap.
return System.Collections.Generic

Refresh() public method

Refreshes (draws) the plot.
public Refresh ( ) : void
return void

Remove() public method

Remove a drawable object from the plot surface.
public Remove ( IDrawable p, bool updateAxes ) : void
p IDrawable the drawable to remove
updateAxes bool whether or not to update the axes after removing the idrawable.
return void

ToStream() public method

Renders the bitmap to a MemoryStream. Useful for returning the bitmap from an ASP.NET page.
public ToStream ( ImageFormat imageFormat ) : MemoryStream
imageFormat ImageFormat
return MemoryStream