NPlot::HorizontalLine Class Reference

Encapsulates functionality for drawing a horizontal line on a plot surface. More...

Inheritance diagram for NPlot::HorizontalLine:

NPlot::IPlot NPlot::IDrawable List of all members.

Public Member Functions

 HorizontalLine (double ordinateValue)
 Constructor.
 HorizontalLine (double ordinateValue, Color color)
 Constructor.
 HorizontalLine (double ordinateValue, Pen pen)
 Constructor.
void DrawInLegend (System.Drawing.Graphics g, System.Drawing.Rectangle startEnd)
 Draws a representation of the horizontal line in the legend.
Axis SuggestXAxis ()
 Returns null indicating that x extremities of the line are variable.
Axis SuggestYAxis ()
 Returns a y-axis that is suitable for drawing this plot.
void WriteData (System.Text.StringBuilder sb, RectangleD region, bool onlyInRegion)
 Writes text data describing the horizontal line object to the supplied string builder.
void Draw (System.Drawing.Graphics g, PhysicalAxis xAxis, PhysicalAxis yAxis)
 Draws the horizontal line plot on a GDI+ surface against the provided x and y axes.

Properties

string Label
 A label to associate with the plot - used in the legend.
string label_ = ""
bool ShowInLegend
 Whether or not to include an entry for this plot in the legend if it exists.
bool showInLegend_ = false
double value_
double OrdinateValue
 ordinate (Y) value to draw horizontal line at.
Pen pen_ = new Pen( Color.Black )
Pen Pen
 Pen to use to draw the horizontal line.
int PixelIndent
 Each end of the line is indented by this many pixels.
int pixelIndent_ = 0
float LengthScale
 The line length is multiplied by this amount.
float scale_ = 1.0f

Detailed Description

Encapsulates functionality for drawing a horizontal line on a plot surface.

Definition at line 61 of file HorizontalLine.cs.


Constructor & Destructor Documentation

NPlot::HorizontalLine::HorizontalLine double  ordinateValue  )  [inline]
 

Constructor.

Parameters:
ordinateValue ordinate (Y) value of line.

Definition at line 68 of file HorizontalLine.cs.

NPlot::HorizontalLine::HorizontalLine double  ordinateValue,
Color  color
[inline]
 

Constructor.

Parameters:
ordinateValue ordinate (Y) value of line.
color draw the line using this color.

Definition at line 79 of file HorizontalLine.cs.

References Pen.

NPlot::HorizontalLine::HorizontalLine double  ordinateValue,
Pen  pen
[inline]
 

Constructor.

Parameters:
ordinateValue ordinate (Y) value of line.
pen Pen to use to draw the line.

Definition at line 90 of file HorizontalLine.cs.


Member Function Documentation

void NPlot::HorizontalLine::Draw System.Drawing.Graphics  g,
PhysicalAxis  xAxis,
PhysicalAxis  yAxis
[inline]
 

Draws the horizontal line plot on a GDI+ surface against the provided x and y axes.

Parameters:
g The GDI+ surface on which to draw.
xAxis The X-Axis to draw against.
yAxis The Y-Axis to draw against.

Definition at line 197 of file HorizontalLine.cs.

References pen_, NPlot::PhysicalAxis::PhysicalMax, NPlot::PhysicalAxis::PhysicalMin, pixelIndent_, scale_, value_, and NPlot::PhysicalAxis::WorldToPhysical().

void NPlot::HorizontalLine::DrawInLegend System.Drawing.Graphics  g,
System.Drawing.Rectangle  startEnd
[inline]
 

Draws a representation of the horizontal line in the legend.

Parameters:
g The graphics surface on which to draw
startEnd A rectangle specifying the bounds of the area in the legend set aside for drawing.

Definition at line 102 of file HorizontalLine.cs.

References pen_.

Axis NPlot::HorizontalLine::SuggestXAxis  )  [inline]
 

Returns null indicating that x extremities of the line are variable.

Returns:
null

Implements NPlot::IPlot.

Definition at line 148 of file HorizontalLine.cs.

Axis NPlot::HorizontalLine::SuggestYAxis  )  [inline]
 

Returns a y-axis that is suitable for drawing this plot.

Returns:
A suitable y-axis.

Implements NPlot::IPlot.

Definition at line 158 of file HorizontalLine.cs.

References value_.

void NPlot::HorizontalLine::WriteData System.Text.StringBuilder  sb,
RectangleD  region,
bool  onlyInRegion
[inline]
 

Writes text data describing the horizontal line object to the supplied string builder.

It is possible to specify that the data will be written only if the line is in the specified region.

Parameters:
sb the StringBuilder object to write to.
region a region used if onlyInRegion is true.
onlyInRegion If true, data will be written only if the line is in the specified region.

Implements NPlot::IPlot.

Definition at line 171 of file HorizontalLine.cs.

References NPlot::RectangleD::Height, Label, value_, and NPlot::RectangleD::Y.


Property Documentation

string NPlot::HorizontalLine::Label [get, set]
 

A label to associate with the plot - used in the legend.

Implements NPlot::IPlot.

Definition at line 113 of file HorizontalLine.cs.

Referenced by WriteData().

string NPlot::HorizontalLine::label_ = "" [private]
 

Definition at line 124 of file HorizontalLine.cs.

float NPlot::HorizontalLine::LengthScale [get, set]
 

The line length is multiplied by this amount.

Default corresponds to a value of 1.0.

Definition at line 274 of file HorizontalLine.cs.

double NPlot::HorizontalLine::OrdinateValue [get, set]
 

ordinate (Y) value to draw horizontal line at.

Definition at line 224 of file HorizontalLine.cs.

Referenced by NPlot::FilledRegion::Draw().

Pen NPlot::HorizontalLine::Pen [get, set]
 

Pen to use to draw the horizontal line.

Definition at line 240 of file HorizontalLine.cs.

Referenced by HorizontalLine().

Pen NPlot::HorizontalLine::pen_ = new Pen( Color.Black ) [private]
 

Definition at line 235 of file HorizontalLine.cs.

Referenced by Draw(), and DrawInLegend().

int NPlot::HorizontalLine::PixelIndent [get, set]
 

Each end of the line is indented by this many pixels.

Definition at line 256 of file HorizontalLine.cs.

int NPlot::HorizontalLine::pixelIndent_ = 0 [private]
 

Definition at line 266 of file HorizontalLine.cs.

Referenced by Draw().

float NPlot::HorizontalLine::scale_ = 1.0f [private]
 

Definition at line 284 of file HorizontalLine.cs.

Referenced by Draw().

bool NPlot::HorizontalLine::ShowInLegend [get, set]
 

Whether or not to include an entry for this plot in the legend if it exists.

Implements NPlot::IPlot.

Definition at line 131 of file HorizontalLine.cs.

bool NPlot::HorizontalLine::showInLegend_ = false [private]
 

Definition at line 141 of file HorizontalLine.cs.

double NPlot::HorizontalLine::value_ [private]
 

Definition at line 219 of file HorizontalLine.cs.

Referenced by Draw(), SuggestYAxis(), and WriteData().


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