C# Class NPlot.LogAxis

The class implementing logarithmic axes.
Inheritance: Axis
Show file Open project: mono/nplot-gtk Class Usage Examples

Public Methods

Method Description
Clone ( ) : object

Deep Copy of the LogAxis.

LogAxis ( ) : System

Default constructor.

LogAxis ( Axis a ) : System

Copy Constructor

LogAxis ( double worldMin, double worldMax ) : System

Constructor

PhysicalToWorld ( PointF p, PointF physicalMin, PointF physicalMax, bool clip ) : double

Return the world coordinate of the projection of the point p onto the axis.

WorldToPhysical ( double coord, PointF physicalMin, PointF physicalMax, bool clip ) : PointF

World to physical coordinate transform.

TODO: make Reversed property work for this.

Protected Methods

Method Description
DoClone ( LogAxis b, LogAxis a ) : void

Helper method for Clone (actual implementation)

DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void

Draw the ticks.

Private Methods

Method Description
CalcGrids ( double dLenAxis, int nNumDivisions, double &dDivisionInterval ) : void
DetermineNumberSmallTicks ( double bigTickDist ) : int

Determines the number of small ticks between two large ticks.

DetermineTickSpacing ( ) : double

Determines the tick spacing.

Init ( ) : void
WorldTickPositions_FirstPass ( Point physicalMin, Point physicalMax, ArrayList &largeTickPositions, ArrayList &smallTickPositions ) : void

Determines the positions, in world coordinates, of the log spaced large ticks.

WorldTickPositions_SecondPass ( Point physicalMin, Point physicalMax, ArrayList largeTickPositions, ArrayList &smallTickPositions ) : void

Determines the positions, in world coordinates, of the small ticks if they have not already been generated.

Method Details

Clone() public method

Deep Copy of the LogAxis.
public Clone ( ) : object
return object

DoClone() protected method

Helper method for Clone (actual implementation)
protected DoClone ( LogAxis b, LogAxis a ) : void
b LogAxis The cloned object.
a LogAxis The original object to clone.
return void

DrawTicks() protected method

Draw the ticks.
protected DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void
g System.Drawing.Graphics The drawing surface on which to draw.
physicalMin Point The minimum physical extent of the axis.
physicalMax Point The maximum physical extent of the axis.
labelOffset object out: a suitable offset from the axis to draw the axis label.
boundingBox object out: smallest box that completely encompasses all of the ticks and tick labels.
return void

LogAxis() public method

Default constructor.
public LogAxis ( ) : System
return System

LogAxis() public method

Copy Constructor
public LogAxis ( Axis a ) : System
a Axis The Axis to clone.
return System

LogAxis() public method

Constructor
public LogAxis ( double worldMin, double worldMax ) : System
worldMin double Minimum World value for the axis.
worldMax double Maximum World value for the axis.
return System

PhysicalToWorld() public method

Return the world coordinate of the projection of the point p onto the axis.
public PhysicalToWorld ( PointF p, PointF physicalMin, PointF physicalMax, bool clip ) : double
p System.Drawing.PointF The point to project onto the axis
physicalMin System.Drawing.PointF The physical position corresponding to the world minimum of the axis.
physicalMax System.Drawing.PointF The physical position corresponding to the world maximum of the axis.
clip bool If true, the world value will be clipped to WorldMin or WorldMax as appropriate if it lies outside this range.
return double

WorldToPhysical() public method

World to physical coordinate transform.
TODO: make Reversed property work for this.
public WorldToPhysical ( double coord, PointF physicalMin, PointF physicalMax, bool clip ) : PointF
coord double The coordinate value to transform.
physicalMin System.Drawing.PointF The physical position corresponding to the world minimum of the axis.
physicalMax System.Drawing.PointF The physical position corresponding to the world maximum of the axis.
clip bool if false, then physical value may extend outside worldMin / worldMax. If true, the physical value returned will be clipped to physicalMin or physicalMax if it lies outside this range.
return System.Drawing.PointF