C# Class NPlot.LabelAxis

Allows the creation of axes with any number of user defined labels at user defined world values along the axis.
Inheritance: Axis
ファイルを表示 Open project: mono/nplot-gtk Class Usage Examples

Public Methods

Method Description
AddLabel ( string name, double val ) : void

Adds a label to the axis

Clone ( ) : object

Deep copy of LabelAxis.

LabelAxis ( ) : System

Default constructor

LabelAxis ( Axis a ) : System

Copy constructor

TODO: [review notes] I don't think this will work as desired.

LabelAxis ( double worldMin, double worldMax ) : System

Constructor

Protected Methods

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

Helper method for Clone.

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

Given Graphics surface, and physical extents of axis, draw ticks and associated labels.

Private Methods

Method Description
Init ( ) : void

Initialise LabelAxis to default state.

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

Determines the positions, in world coordinates, of the large ticks. Label axes do not have small ticks.

Method Details

AddLabel() public method

Adds a label to the axis
public AddLabel ( string name, double val ) : void
name string The label
val double The world value at which to place the label
return void

Clone() public method

Deep copy of LabelAxis.
public Clone ( ) : object
return object

DoClone() protected static method

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

DrawTicks() protected method

Given Graphics surface, and physical extents of axis, draw ticks and associated labels.
protected DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void
g System.Drawing.Graphics The GDI+ Graphics surface on which to draw.
physicalMin Point The physical location of the world min point
physicalMax Point The physical location of the world max point
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

LabelAxis() public method

Default constructor
public LabelAxis ( ) : System
return System

LabelAxis() public method

Copy constructor
TODO: [review notes] I don't think this will work as desired.
public LabelAxis ( Axis a ) : System
a Axis The Axis to clone.
return System

LabelAxis() public method

Constructor
public LabelAxis ( double worldMin, double worldMax ) : System
worldMin double Minimum world value
worldMax double Maximum world value
return System