Public Member Functions | |
PhysicalAxis (Axis a, Point physicalMin, Point physicalMax) | |
Construct. | |
virtual Rectangle | GetBoundingBox () |
Returns the smallest rectangle that completely contains all parts of the axis [including ticks and label]. | |
virtual void | Draw (System.Drawing.Graphics g, out Rectangle boundingBox) |
Draws the axis on the given graphics surface. | |
PointF | WorldToPhysical (double coord, bool clip) |
Given a world coordinate value, returns the physical position of the coordinate along the axis. | |
double | PhysicalToWorld (Point p, bool clip) |
Given a physical point on the graphics surface, returns the world value of it's projection onto the axis [i.e. | |
void | SetWorldLimitsFromPhysical (Point min, Point max) |
This sets new world limits for the axis from two physical points selected within the plot area. | |
Properties | |
Point | PhysicalMin |
The physical position corresponding to WorldMin. | |
Point | physicalMin_ |
Point | PhysicalMax |
The physical position corresponding to WorldMax. | |
Point | physicalMax_ |
Axis | Axis |
The axis this object adds physical extents to. | |
Axis | axis_ |
int | PhysicalLength |
The length in pixels of the axis. | |
double | PixelWorldLength |
The length in world coordinates of one pixel. | |
Private Member Functions | |
PhysicalAxis () | |
Prevent default construction. |
It's an interesting question where to put this information. It belongs with every specific axis type, but on the other hand, users of the library as it is normally used should not see it because positioning of axes is handled internally by PlotSurface2D. Therefore it doesn't make sense to put it in the Axis class unless it is internal. But if this were done it would restrict use of this information outside the library always, which is not what is wanted. The main disadvantage with the method chosen is that there is a lot of passing of the positional information between physical axis and the underlying logical axis type.
C# doesn't have templates. If it did, I might derive PhysicalAxis from the templated Axis type (LinearAxis etc). Instead, have used a has-a relationship with an Axis superclass.
Definition at line 78 of file PhysicalAxis.cs.
|
Prevent default construction.
Definition at line 84 of file PhysicalAxis.cs. |
|
Construct.
Definition at line 95 of file PhysicalAxis.cs. |
|
Draws the axis on the given graphics surface.
Definition at line 123 of file PhysicalAxis.cs. References PhysicalMax, and PhysicalMin. |
|
Returns the smallest rectangle that completely contains all parts of the axis [including ticks and label].
Definition at line 107 of file PhysicalAxis.cs. |
|
Given a physical point on the graphics surface, returns the world value of it's projection onto the axis [i.e. closest point on the axis]. The function is implemented for axes of arbitrary orientation.
Definition at line 152 of file PhysicalAxis.cs. References PhysicalMax, and PhysicalMin. |
|
This sets new world limits for the axis from two physical points selected within the plot area.
Definition at line 164 of file PhysicalAxis.cs. |
|
Given a world coordinate value, returns the physical position of the coordinate along the axis.
Definition at line 136 of file PhysicalAxis.cs. References PhysicalMax, and PhysicalMin. Referenced by NPlot::CandlePlot::CalculatePhysicalSeparation(), NPlot::VerticalLine::Draw(), NPlot::TextItem::Draw(), NPlot::StepPlot::Draw(), NPlot::PointPlot::Draw(), NPlot::MarkerItem::Draw(), NPlot::LabelPointPlot::Draw(), NPlot::ImagePlot::Draw(), NPlot::HorizontalLine::Draw(), NPlot::HistogramPlot::Draw(), NPlot::CandlePlot::Draw(), NPlot::ArrowItem::Draw(), NPlot::Grid::DrawGridLines(), NPlot::Transform2D::FastTransform2D::Transform(), and NPlot::Transform2D::DefaultTransform2D::Transform(). |
|
The axis this object adds physical extents to.
Definition at line 240 of file PhysicalAxis.cs. Referenced by NPlot::AxesConstraint::AspectRatio::ApplyConstraint(), NPlot::AxesConstraint::YPixelWorldLength::ApplyConstraint(), NPlot::AxesConstraint::XPixelWorldLength::ApplyConstraint(), NPlot::PointPlot::Draw(), NPlot::ImagePlot::Draw(), NPlot::Grid::Draw(), NPlot::FilledRegion::Draw(), NPlot::ArrowItem::Draw(), and NPlot::PageAlignedPhysicalAxis::PageAlignedPhysicalAxis(). |
|
Definition at line 250 of file PhysicalAxis.cs. |
|
The length in pixels of the axis.
Definition at line 257 of file PhysicalAxis.cs. Referenced by NPlot::AxesConstraint::YPixelWorldLength::ApplyConstraint(), NPlot::AxesConstraint::XPixelWorldLength::ApplyConstraint(), and NPlot::FilledRegion::Draw(). |
|
|
Definition at line 233 of file PhysicalAxis.cs. |
|
|
Definition at line 216 of file PhysicalAxis.cs. |
|
The length in world coordinates of one pixel.
Definition at line 268 of file PhysicalAxis.cs. |