C# Class NPlot.PlotSurface2D

Implements the surface on which IDrawables are drawn. Is extended by Bitmap.PlotSurface2D, Windows.PlotSurface2D etc. TODO: better explanation.
Inheritance: IPlotSurface2D
Afficher le fichier Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Méthodes publiques

Méthode Description
Add ( IDrawable p ) : void

Adds a drawable object to the plot surface with z-order 0. 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 constraint ) : void

Add an axis constraint to the plot surface. Axes constraints give you control over where NPlot positions each axes, and the world - pixel ratio.

Clear ( ) : void

Clears the plot and resets all state to the default.

Draw ( Graphics g, Rectangle bounds ) : void

Draw the the PlotSurface2D and all contents [axes, drawables] on the supplied graphics surface.

HitTest ( Point p ) : ArrayList

Performs a hit test with the given point and returns information about the object being hit.

PlotSurface2D ( ) : System

Default constructor.

Remove ( IDrawable p, bool updateAxes ) : void

Remove a drawable object. Note that axes are not updated.

Private Methods

Méthode Description
DetermineAxesToDraw ( Axis &xAxis1, Axis &xAxis2, Axis &yAxis1, Axis &yAxis2 ) : void
DeterminePhysicalAxesToDraw ( Rectangle bounds, Axis xAxis1, Axis xAxis2, Axis yAxis1, Axis yAxis2, PhysicalAxis &pXAxis1, PhysicalAxis &pXAxis2, PhysicalAxis &pYAxis1, PhysicalAxis &pYAxis2 ) : void
DetermineScaleFactor ( int w, int h ) : float
Init ( ) : void
RefreshZOrdering ( ) : void

If a plot is removed, then the ordering_ list needs to be recalculated.

UpdateAxes ( bool recalculateAll ) : void

Method Details

Add() public méthode

Adds a drawable object to the plot surface with z-order 0. 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.
Résultat void

Add() public méthode

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)
Résultat void

AddAxesConstraint() public méthode

Add an axis constraint to the plot surface. Axes constraints give you control over where NPlot positions each axes, and the world - pixel ratio.
public AddAxesConstraint ( AxesConstraint constraint ) : void
constraint AxesConstraint The axis constraint to add.
Résultat void

Clear() public méthode

Clears the plot and resets all state to the default.
public Clear ( ) : void
Résultat void

Draw() public méthode

Draw the the PlotSurface2D and all contents [axes, drawables] on the supplied graphics surface.
public Draw ( Graphics g, Rectangle bounds ) : void
g System.Drawing.Graphics The graphics surface on which to draw.
bounds System.Drawing.Rectangle A bounding box on this surface that denotes the area on the /// surface to confine drawing to.
Résultat void

HitTest() public méthode

Performs a hit test with the given point and returns information about the object being hit.
public HitTest ( Point p ) : ArrayList
p Point The point to test.
Résultat System.Collections.ArrayList

PlotSurface2D() public méthode

Default constructor.
public PlotSurface2D ( ) : System
Résultat System

Remove() public méthode

Remove a drawable object. Note that axes are not updated.
public Remove ( IDrawable p, bool updateAxes ) : void
p IDrawable Drawable to remove.
updateAxes bool if true, the axes are updated.
Résultat void