Inheritance diagram for NPlot::PlotSurface2D:
Public Types | |
enum | XAxisPosition { Top = 1, Bottom = 3 } |
Possible positions of the X axis. More... | |
enum | YAxisPosition { Left = 1, Right = 3 } |
Possible positions of the Y axis. More... | |
Public Member Functions | |
System.Collections.ArrayList | HitTest (Point p) |
Performs a hit test with the given point and returns information about the object being hit. | |
PlotSurface2D () | |
Default constructor. | |
void | Add (IDrawable p) |
Adds a drawable object to the plot surface with z-order 0. | |
void | Add (IDrawable p, int zOrder) |
Adds a drawable object to the plot surface. | |
void | Add (IDrawable p, XAxisPosition xp, YAxisPosition yp) |
Adds a drawable object to the plot surface against the specified axes with z-order of 0. | |
void | Add (IDrawable p, XAxisPosition xp, YAxisPosition yp, int zOrder) |
the object is an IPlot, the PlotSurface2D axes will also be updated. | |
void | Draw (Graphics g, Rectangle bounds) |
Draw the the PlotSurface2D and all contents [axes, drawables, and legend] on the supplied graphics surface. | |
void | Clear () |
Clears the plot and resets all state to the default. | |
void | AddAxesConstraint (AxesConstraint constraint) |
Add an axis constraint to the plot surface. | |
void | Remove (IDrawable p, bool updateAxes) |
Remove a drawable object. | |
Axis | WhichXAxis (IPlot plot) |
Returns the x-axis associated with a given plot. | |
Axis | WhichYAxis (IPlot plot) |
Returns the y-axis associated with a given plot. | |
Properties | |
Rectangle | PlotAreaBoundingBoxCache |
The physical bounding box of the last drawn plot surface area is available here. | |
Axis | XAxis1 |
The bottom abscissa axis. | |
Axis | YAxis1 |
The left ordinate axis. | |
Axis | XAxis2 |
The top abscissa axis. | |
Axis | YAxis2 |
The right ordinate axis. | |
PhysicalAxis | PhysicalXAxis1Cache |
The physical XAxis1 that was last drawn. | |
PhysicalAxis | PhysicalYAxis1Cache |
The physical YAxis1 that was last drawn. | |
PhysicalAxis | PhysicalXAxis2Cache |
The physical XAxis2 that was last drawn. | |
PhysicalAxis | PhysicalYAxis2Cache |
The physical YAxis2 that was last drawn. | |
string | Title |
The chart title. | |
Font | TitleFont |
The plot title font. | |
int | Padding |
The distance in pixels to leave between of the edge of the bounding rectangle supplied to the Draw method, and the markings that make up the plot. | |
Color | TitleColor |
Sets the title to be drawn using a solid brush of this color. | |
Brush | TitleBrush |
The brush used for drawing the title. | |
System.Drawing.Color | PlotBackColor |
A color used to paint the plot background. | |
System.Drawing.Bitmap | PlotBackImage |
An imaged used to paint the plot background. | |
IRectangleBrush | PlotBackBrush |
A Rectangle brush used to paint the plot background. | |
System.Drawing.Drawing2D.SmoothingMode | SmoothingMode |
Smoothing mode to use when drawing plots. | |
int | uniqueCounter_ = 0 |
NPlot.Legend | Legend |
Legend to use. | |
bool | AutoScaleTitle |
Whether or not the title will be scaled according to size of the plot surface. | |
bool | AutoScaleAutoGeneratedAxes |
When plots are added to the plot surface, the axes they are attached to are immediately modified to reflect data of the plot. | |
ArrayList | Drawables |
Gets an array list containing all drawables currently added to the PlotSurface2D. | |
int | LegendZOrder |
Setting this value determines the order (relative to IDrawables added to the plot surface) that the legend is drawn. | |
int | legendZOrder_ = -1 |
Private Member Functions | |
void | Init () |
float | DetermineScaleFactor (int w, int h) |
void | UpdateAxes (bool recalculateAll) |
void | DetermineAxesToDraw (out Axis xAxis1, out Axis xAxis2, out Axis yAxis1, out Axis yAxis2) |
void | DeterminePhysicalAxesToDraw (Rectangle bounds, Axis xAxis1, Axis xAxis2, Axis yAxis1, Axis yAxis2, out PhysicalAxis pXAxis1, out PhysicalAxis pXAxis2, out PhysicalAxis pYAxis1, out PhysicalAxis pYAxis2) |
void | RefreshZOrdering () |
If a plot is removed, then the ordering_ list needs to be recalculated. | |
Private Attributes | |
System.Drawing.StringFormat | titleDrawFormat_ |
Font | titleFont_ |
string | title_ |
Brush | titleBrush_ |
int | padding_ |
Axis | xAxis1_ |
Axis | yAxis1_ |
Axis | xAxis2_ |
Axis | yAxis2_ |
PhysicalAxis | pXAxis1Cache_ |
PhysicalAxis | pYAxis1Cache_ |
PhysicalAxis | pXAxis2Cache_ |
PhysicalAxis | pYAxis2Cache_ |
bool | autoScaleAutoGeneratedAxes_ = false |
bool | autoScaleTitle_ = false |
object | plotAreaBoundingBoxCache_ |
object | bbXAxis1Cache_ |
object | bbXAxis2Cache_ |
object | bbYAxis1Cache_ |
object | bbYAxis2Cache_ |
object | bbTitleCache_ |
object | plotBackColor_ = null |
System.Drawing.Bitmap | plotBackImage_ = null |
IRectangleBrush | plotBackBrush_ = null |
System.Collections.ArrayList | drawables_ |
System.Collections.ArrayList | xAxisPositions_ |
System.Collections.ArrayList | yAxisPositions_ |
System.Collections.ArrayList | zPositions_ |
System.Collections.SortedList | ordering_ |
System.Drawing.Drawing2D.SmoothingMode | smoothingMode_ |
ArrayList | axesConstraints_ = null |
Legend | legend_ |
Is extended by Bitmap.PlotSurface2D, Windows.PlotSurface2D etc. TODO: better explanation.
Definition at line 66 of file PlotSurface2D.cs.
|
Possible positions of the X axis.
Definition at line 72 of file PlotSurface2D.cs. |
|
Possible positions of the Y axis.
Definition at line 89 of file PlotSurface2D.cs. |
|
Default constructor.
Definition at line 496 of file PlotSurface2D.cs. References Init(), and titleDrawFormat_. |
|
the object is an IPlot, the PlotSurface2D axes will also be updated.
Definition at line 568 of file PlotSurface2D.cs. References drawables_, ordering_, uniqueCounter_, UpdateAxes(), xAxisPositions_, yAxisPositions_, and zPositions_. |
|
Adds a drawable object to the plot surface against the specified axes with z-order of 0. If the object is an IPlot, the PlotSurface2D axes will also be updated.
Definition at line 554 of file PlotSurface2D.cs. References Add(). |
|
Adds a drawable object to the plot surface. If the object is an IPlot, the PlotSurface2D axes will also be updated.
Implements NPlot::IPlotSurface2D. Definition at line 540 of file PlotSurface2D.cs. References 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.
Implements NPlot::IPlotSurface2D. Definition at line 528 of file PlotSurface2D.cs. Referenced by Add(). |
|
Add an axis constraint to the plot surface. Axes constraints give you control over where NPlot positions each axes, and the world - pixel ratio.
Implements NPlot::IPlotSurface2D. Definition at line 1182 of file PlotSurface2D.cs. |
|
Clears the plot and resets all state to the default.
Implements NPlot::IPlotSurface2D. Definition at line 1153 of file PlotSurface2D.cs. References Init(). |
|
Definition at line 762 of file PlotSurface2D.cs. References NPlot::Axis::Clone(), xAxis1_, xAxis2_, yAxis1_, and yAxis2_. |
|
Definition at line 810 of file PlotSurface2D.cs. References AutoScaleTitle, padding_, title_, and titleFont_. |
|
Definition at line 506 of file PlotSurface2D.cs. Referenced by Draw(). |
|
Draw the the PlotSurface2D and all contents [axes, drawables, and legend] on the supplied graphics surface.
Definition at line 916 of file PlotSurface2D.cs. References AutoScaleTitle, axesConstraints_, bbTitleCache_, bbXAxis1Cache_, bbXAxis2Cache_, bbYAxis1Cache_, bbYAxis2Cache_, DetermineScaleFactor(), NPlot::IDrawable::Draw(), NPlot::LegendBase::Draw(), drawables_, NPlot::IRectangleBrush::Get(), legend_, legendZOrder_, ordering_, padding_, plotAreaBoundingBoxCache_, plotBackBrush_, plotBackColor_, plotBackImage_, title_, titleBrush_, titleDrawFormat_, titleFont_, NPlot::Legend::UpdateAxesPositions(), xAxisPositions_, and yAxisPositions_. |
|
Performs a hit test with the given point and returns information about the object being hit.
Definition at line 168 of file PlotSurface2D.cs. References bbTitleCache_, bbXAxis1Cache_, bbXAxis2Cache_, bbYAxis1Cache_, bbYAxis2Cache_, plotAreaBoundingBoxCache_, xAxis1_, xAxis2_, yAxis1_, and yAxis2_. |
|
Definition at line 461 of file PlotSurface2D.cs. References autoScaleAutoGeneratedAxes_, autoScaleTitle_, axesConstraints_, drawables_, ordering_, padding_, plotBackColor_, pXAxis1Cache_, pXAxis2Cache_, pYAxis1Cache_, pYAxis2Cache_, smoothingMode_, title_, titleBrush_, TitleFont, xAxis1_, xAxis2_, xAxisPositions_, yAxis1_, yAxis2_, yAxisPositions_, and zPositions_. Referenced by Clear(), and PlotSurface2D(). |
|
If a plot is removed, then the ordering_ list needs to be recalculated.
Definition at line 1254 of file PlotSurface2D.cs. References ordering_, uniqueCounter_, and zPositions_. |
|
Remove a drawable object. Note that axes are not updated.
Implements NPlot::IPlotSurface2D. Definition at line 1231 of file PlotSurface2D.cs. References drawables_, xAxisPositions_, yAxisPositions_, and zPositions_. |
|
Definition at line 589 of file PlotSurface2D.cs. References AutoScaleAutoGeneratedAxes, drawables_, NPlot::IPlot::SuggestXAxis(), NPlot::IPlot::SuggestYAxis(), NPlot::Axis::TicksAngle, xAxis1_, xAxis2_, xAxisPositions_, yAxis1_, yAxis2_, and yAxisPositions_. Referenced by Add(). |
|
Returns the x-axis associated with a given plot.
Definition at line 1286 of file PlotSurface2D.cs. References drawables_, and xAxisPositions_. |
|
Returns the y-axis associated with a given plot.
Definition at line 1302 of file PlotSurface2D.cs. References drawables_, and yAxisPositions_. |
|
Definition at line 117 of file PlotSurface2D.cs. Referenced by Init(). |
|
Definition at line 118 of file PlotSurface2D.cs. Referenced by Init(). |
|
Definition at line 139 of file PlotSurface2D.cs. |
|
Definition at line 125 of file PlotSurface2D.cs. |
|
Definition at line 121 of file PlotSurface2D.cs. |
|
Definition at line 122 of file PlotSurface2D.cs. |
|
Definition at line 123 of file PlotSurface2D.cs. |
|
Definition at line 124 of file PlotSurface2D.cs. |
|
Definition at line 131 of file PlotSurface2D.cs. Referenced by Add(), Draw(), Init(), Remove(), UpdateAxes(), WhichXAxis(), and WhichYAxis(). |
|
Definition at line 141 of file PlotSurface2D.cs. Referenced by Draw(). |
|
Definition at line 135 of file PlotSurface2D.cs. Referenced by Add(), Draw(), Init(), and RefreshZOrdering(). |
|
Definition at line 108 of file PlotSurface2D.cs. Referenced by DeterminePhysicalAxesToDraw(), Draw(), and Init(). |
|
Definition at line 120 of file PlotSurface2D.cs. |
|
Definition at line 129 of file PlotSurface2D.cs. Referenced by Draw(). |
|
Definition at line 127 of file PlotSurface2D.cs. |
|
Definition at line 128 of file PlotSurface2D.cs. Referenced by Draw(). |
|
Definition at line 113 of file PlotSurface2D.cs. Referenced by Init(). |
|
Definition at line 115 of file PlotSurface2D.cs. Referenced by Init(). |
|
Definition at line 114 of file PlotSurface2D.cs. Referenced by Init(). |
|
Definition at line 116 of file PlotSurface2D.cs. Referenced by Init(). |
|
Definition at line 137 of file PlotSurface2D.cs. Referenced by Init(). |
|
Definition at line 106 of file PlotSurface2D.cs. Referenced by DeterminePhysicalAxesToDraw(), Draw(), and Init(). |
|
Definition at line 107 of file PlotSurface2D.cs. |
|
Definition at line 103 of file PlotSurface2D.cs. Referenced by Draw(), and PlotSurface2D(). |
|
Definition at line 105 of file PlotSurface2D.cs. Referenced by DeterminePhysicalAxesToDraw(), and Draw(). |
|
Definition at line 109 of file PlotSurface2D.cs. Referenced by DetermineAxesToDraw(), HitTest(), Init(), and UpdateAxes(). |
|
Definition at line 111 of file PlotSurface2D.cs. Referenced by DetermineAxesToDraw(), HitTest(), Init(), and UpdateAxes(). |
|
Definition at line 132 of file PlotSurface2D.cs. Referenced by Add(), Draw(), Init(), Remove(), UpdateAxes(), and WhichXAxis(). |
|
Definition at line 110 of file PlotSurface2D.cs. Referenced by DetermineAxesToDraw(), HitTest(), Init(), and UpdateAxes(). |
|
Definition at line 112 of file PlotSurface2D.cs. Referenced by DetermineAxesToDraw(), HitTest(), Init(), and UpdateAxes(). |
|
Definition at line 133 of file PlotSurface2D.cs. Referenced by Add(), Draw(), Init(), Remove(), UpdateAxes(), and WhichYAxis(). |
|
Definition at line 134 of file PlotSurface2D.cs. Referenced by Add(), Init(), RefreshZOrdering(), and Remove(). |
|
When plots are added to the plot surface, the axes they are attached to are immediately modified to reflect data of the plot. If AutoScaleAutoGeneratedAxes is true when a plot is added, the axes will be turned in to auto scaling ones if they are not already [tick marks, tick text and label size scaled to size of plot surface]. If false, axes will not be autoscaling. Implements NPlot::IPlotSurface2D. Definition at line 1213 of file PlotSurface2D.cs. Referenced by UpdateAxes(). |
|
Whether or not the title will be scaled according to size of the plot surface.
Implements NPlot::IPlotSurface2D. Definition at line 1192 of file PlotSurface2D.cs. Referenced by DeterminePhysicalAxesToDraw(), and Draw(). |
|
Gets an array list containing all drawables currently added to the PlotSurface2D.
Implements NPlot::IPlotSurface2D. Definition at line 1273 of file PlotSurface2D.cs. |
|
Legend to use. If this property is null [default], then the plot surface will have no corresponding legend. Implements NPlot::IPlotSurface2D. Definition at line 1164 of file PlotSurface2D.cs. |
|
Setting this value determines the order (relative to IDrawables added to the plot surface) that the legend is drawn.
Implements NPlot::IPlotSurface2D. Definition at line 1318 of file PlotSurface2D.cs. |
|
Definition at line 1328 of file PlotSurface2D.cs. Referenced by Draw(). |
|
The distance in pixels to leave between of the edge of the bounding rectangle supplied to the Draw method, and the markings that make up the plot.
Implements NPlot::IPlotSurface2D. Definition at line 363 of file PlotSurface2D.cs. |
|
The physical XAxis1 that was last drawn.
Definition at line 281 of file PlotSurface2D.cs. Referenced by NPlot::Windows::PlotSurface2D::DoMouseMove(). |
|
The physical XAxis2 that was last drawn.
Definition at line 305 of file PlotSurface2D.cs. |
|
The physical YAxis1 that was last drawn.
Definition at line 293 of file PlotSurface2D.cs. Referenced by NPlot::Windows::PlotSurface2D::DoMouseMove(). |
|
The physical YAxis2 that was last drawn.
Definition at line 317 of file PlotSurface2D.cs. |
|
The physical bounding box of the last drawn plot surface area is available here.
Definition at line 148 of file PlotSurface2D.cs. |
|
A Rectangle brush used to paint the plot background. Mutually exclusive with PlotBackColor and PlotBackBrush Implements NPlot::IPlotSurface2D. Definition at line 435 of file PlotSurface2D.cs. |
|
A color used to paint the plot background. Mutually exclusive with PlotBackImage and PlotBackBrush Implements NPlot::IPlotSurface2D. Definition at line 407 of file PlotSurface2D.cs. |
|
An imaged used to paint the plot background. Mutually exclusive with PlotBackColor and PlotBackBrush Implements NPlot::IPlotSurface2D. Definition at line 421 of file PlotSurface2D.cs. |
|
Smoothing mode to use when drawing plots.
Implements NPlot::IPlotSurface2D. Definition at line 449 of file PlotSurface2D.cs. |
|
The chart title.
Implements NPlot::IPlotSurface2D. Definition at line 330 of file PlotSurface2D.cs. Referenced by NPlot::Windows::PlotSurface2D::drawDesignMode(). |
|
The brush used for drawing the title.
Implements NPlot::IPlotSurface2D. Definition at line 391 of file PlotSurface2D.cs. Referenced by NPlot::Windows::PlotSurface2D::drawDesignMode(). |
|
Sets the title to be drawn using a solid brush of this color.
Implements NPlot::IPlotSurface2D. Definition at line 379 of file PlotSurface2D.cs. |
|
The plot title font.
Implements NPlot::IPlotSurface2D. Definition at line 346 of file PlotSurface2D.cs. Referenced by NPlot::Windows::PlotSurface2D::drawDesignMode(), and Init(). |
|
Definition at line 586 of file PlotSurface2D.cs. Referenced by Add(), and RefreshZOrdering(). |
|
The bottom abscissa axis.
Implements NPlot::IPlotSurface2D. Definition at line 217 of file PlotSurface2D.cs. |
|
The top abscissa axis.
Implements NPlot::IPlotSurface2D. Definition at line 249 of file PlotSurface2D.cs. |
|
The left ordinate axis.
Implements NPlot::IPlotSurface2D. Definition at line 233 of file PlotSurface2D.cs. |
|
The right ordinate axis.
Implements NPlot::IPlotSurface2D. Definition at line 265 of file PlotSurface2D.cs. |