C# Класс NPlot.PlotSurface2D

Implements the surface on which IDrawables are drawn. Is extended by Bitmap.PlotSurface2D, Windows.PlotSurface2D etc. TODO: better explanation.
Наследование: IPlotSurface2D
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Add() публичный Метод

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.
Результат void

Add() публичный Метод

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)
Результат void

AddAxesConstraint() публичный Метод

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.
Результат void

Clear() публичный Метод

Clears the plot and resets all state to the default.
public Clear ( ) : void
Результат void

Draw() публичный Метод

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.
Результат void

HitTest() публичный Метод

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.
Результат System.Collections.ArrayList

PlotSurface2D() публичный Метод

Default constructor.
public PlotSurface2D ( ) : System
Результат System

Remove() публичный Метод

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.
Результат void