NPlot::Grid Class Reference

Encapsulates a Grid IDrawable object. More...

Inheritance diagram for NPlot::Grid:

NPlot::IDrawable List of all members.

Public Types

enum  GridType { None = 0, Coarse = 1, Fine = 2 }

Public Member Functions

 Grid ()
 Default constructor.
void Draw (Graphics g, PhysicalAxis xAxis, PhysicalAxis yAxis)
 Draws the grid.

Properties

GridType HorizontalGridType
 Specifies the horizontal grid type (none, coarse or fine).
GridType horizontalGridType_
GridType VerticalGridType
 Specifies the vertical grid type (none, coarse, or fine).
GridType verticalGridType_
System.Drawing.Pen MajorGridPen
 The pen used to draw major (coarse) grid lines.
Pen majorGridPen_
System.Drawing.Pen MinorGridPen
 The pen used to draw minor (fine) grid lines.
Pen minorGridPen_

Private Member Functions

void DrawGridLines (Graphics g, PhysicalAxis axis, PhysicalAxis orthogonalAxis, System.Collections.ArrayList a, bool horizontal, Pen p)
 Does all the work in drawing grid lines.

Detailed Description

Encapsulates a Grid IDrawable object.

Instances of this to a PlotSurface2D instance to produce a grid.

Definition at line 64 of file Grid.cs.


Member Enumeration Documentation

enum NPlot::Grid::GridType
 

Enumerator:
None  No grid.
Coarse  Coarse grid.

Lines at large tick positions only.

Fine  Fine grid.

Lines at both large and small tick positions.

Definition at line 70 of file Grid.cs.


Constructor & Destructor Documentation

NPlot::Grid::Grid  )  [inline]
 

Default constructor.

Definition at line 90 of file Grid.cs.

References horizontalGridType_, majorGridPen_, minorGridPen_, and verticalGridType_.


Member Function Documentation

void NPlot::Grid::Draw Graphics  g,
PhysicalAxis  xAxis,
PhysicalAxis  yAxis
[inline]
 

Draws the grid.

Parameters:
g The graphics surface on which to draw
xAxis The physical x axis to draw horizontal lines parallel to.
yAxis The physical y axis to draw vertical lines parallel to.

Implements NPlot::IDrawable.

Definition at line 212 of file Grid.cs.

References NPlot::PhysicalAxis::Axis, DrawGridLines(), horizontalGridType_, MajorGridPen, MinorGridPen, NPlot::PhysicalAxis::PhysicalMax, NPlot::PhysicalAxis::PhysicalMin, verticalGridType_, NPlot::Axis::WorldTickPositions_FirstPass(), and NPlot::Axis::WorldTickPositions_SecondPass().

void NPlot::Grid::DrawGridLines Graphics  g,
PhysicalAxis  axis,
PhysicalAxis  orthogonalAxis,
System.Collections.ArrayList  a,
bool  horizontal,
Pen  p
[inline, private]
 

Does all the work in drawing grid lines.

Parameters:
g The graphics surface on which to render.
axis TODO
orthogonalAxis TODO
a the list of world values to draw grid lines at.
horizontal true if want horizontal lines, false otherwise.
p the pen to use to draw the grid lines.

Definition at line 181 of file Grid.cs.

References NPlot::PhysicalAxis::PhysicalMax, NPlot::PhysicalAxis::PhysicalMin, and NPlot::PhysicalAxis::WorldToPhysical().

Referenced by Draw().


Property Documentation

GridType NPlot::Grid::HorizontalGridType [get, set]
 

Specifies the horizontal grid type (none, coarse or fine).

Definition at line 108 of file Grid.cs.

GridType NPlot::Grid::horizontalGridType_ [private]
 

Definition at line 118 of file Grid.cs.

Referenced by Draw(), and Grid().

System.Drawing.Pen NPlot::Grid::MajorGridPen [get, set]
 

The pen used to draw major (coarse) grid lines.

Definition at line 142 of file Grid.cs.

Referenced by Draw().

Pen NPlot::Grid::majorGridPen_ [private]
 

Definition at line 152 of file Grid.cs.

Referenced by Grid().

System.Drawing.Pen NPlot::Grid::MinorGridPen [get, set]
 

The pen used to draw minor (fine) grid lines.

Definition at line 159 of file Grid.cs.

Referenced by Draw().

Pen NPlot::Grid::minorGridPen_ [private]
 

Definition at line 169 of file Grid.cs.

Referenced by Grid().

GridType NPlot::Grid::VerticalGridType [get, set]
 

Specifies the vertical grid type (none, coarse, or fine).

Definition at line 125 of file Grid.cs.

GridType NPlot::Grid::verticalGridType_ [private]
 

Definition at line 135 of file Grid.cs.

Referenced by Draw(), and Grid().


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 01:04:08 2005 for NPlot by  doxygen 1.4.5