C# Class NPlot.PiAxis

Axis with labels in multiples of Pi. Maybe needs a better name. Lots of functionality still to be added - currently only puts labels at whole increments of pi, want arbitrary increments, automatically determined and dependance on physical length. Volunteers?
Inheritance: Axis
Datei anzeigen Open project: mono/nplot-gtk Class Usage Examples

Public Methods

Method Description
Clone ( ) : object

Deep copy of PiAxis.

PiAxis ( ) : System

Default constructor

PiAxis ( Axis a ) : System

Copy constructor

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

PiAxis ( double worldMin, double worldMax ) : System

Constructor

Protected Methods

Method Description
DoClone ( PiAxis b, PiAxis 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 PiAxis 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

Clone() public method

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

DoClone() protected static method

Helper method for Clone.
protected static DoClone ( PiAxis b, PiAxis a ) : void
b PiAxis The cloned object.
a PiAxis 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

PiAxis() public method

Default constructor
public PiAxis ( ) : System
return System

PiAxis() public method

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

PiAxis() public method

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