NPlot::Legend Class Reference

Legend functionality specific to Legends associated with a PlotSurface2D. More...

Inheritance diagram for NPlot::Legend:

NPlot::LegendBase List of all members.

Public Types

enum  Placement { Inside = 0, Outside = 1 }
 Enumeration of possible Legend placements. More...

Public Member Functions

void AttachTo (PlotSurface2D.XAxisPosition xa, PlotSurface2D.YAxisPosition ya)
 Specify the Axes to attach the legend to.
 Legend ()
 Default constructor.
void UpdateAxesPositions (PhysicalAxis pXAxis1, PhysicalAxis pYAxis1, PhysicalAxis pXAxis2, PhysicalAxis pYAxis2, ArrayList plots, float scale, int padding, Rectangle bounds, out Point position)
 Updates the PlotSurface2D axes to compensate for the legend.

Properties

bool NeverShiftAxes
 Whether or not the positions of the Axes may be shifted to make room for the Legend.
int XOffset
 Offset from the chosen Y-Axis.
int YOffset
 Offset from the X-Axis.
Legend.Placement VerticalEdgePlacement
 Whether or not to attach the legend on the inside of the top or bottom axis (which, is specified using the AttachTo method) or the outside.
Legend.Placement HorizontalEdgePlacement
 Whether or not to attach the legend on the inside of the left or right axis (which, is specified using the AttachTo method) or the outside.

Private Attributes

int xOffset_
int yOffset_
PlotSurface2D.XAxisPosition xAttach_
PlotSurface2D.YAxisPosition yAttach_
Placement horizontalEdgePlacement_
Placement verticalEdgePlacement_
bool neverShiftAxes_

Detailed Description

Legend functionality specific to Legends associated with a PlotSurface2D.

Definition at line 63 of file Legend.cs.


Member Enumeration Documentation

enum NPlot::Legend::Placement
 

Enumeration of possible Legend placements.

Enumerator:
Inside  Inside the plot area.
Outside  Outside the plot area.

Definition at line 69 of file Legend.cs.


Constructor & Destructor Documentation

NPlot::Legend::Legend  )  [inline]
 

Default constructor.

Definition at line 189 of file Legend.cs.

References horizontalEdgePlacement_, neverShiftAxes_, verticalEdgePlacement_, xAttach_, xOffset_, yAttach_, and yOffset_.


Member Function Documentation

void NPlot::Legend::AttachTo PlotSurface2D.XAxisPosition  xa,
PlotSurface2D.YAxisPosition  ya
[inline]
 

Specify the Axes to attach the legend to.

Parameters:
xa Specify which horizontal axis the legend should be attached to.
ya Specify which vertical axis the legend should be attached to.

Definition at line 179 of file Legend.cs.

References xAttach_, and yAttach_.

void NPlot::Legend::UpdateAxesPositions PhysicalAxis  pXAxis1,
PhysicalAxis  pYAxis1,
PhysicalAxis  pXAxis2,
PhysicalAxis  pYAxis2,
ArrayList  plots,
float  scale,
int  padding,
Rectangle  bounds,
out Point  position
[inline]
 

Updates the PlotSurface2D axes to compensate for the legend.

Parameters:
pXAxis1 the bottom x axis
pYAxis1 the left y axis
pXAxis2 the top x axis
pYAxis2 the right y axis
plots list of plots.
scale scale parameter (for text and other)
padding padding around plot within bounds.
bounds graphics surface bounds
position legend position

Definition at line 213 of file Legend.cs.

References horizontalEdgePlacement_, neverShiftAxes_, NPlot::PhysicalAxis::PhysicalMax, NPlot::PhysicalAxis::PhysicalMin, verticalEdgePlacement_, xAttach_, and yAttach_.

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


Member Data Documentation

Placement NPlot::Legend::horizontalEdgePlacement_ [private]
 

Definition at line 85 of file Legend.cs.

Referenced by Legend(), and UpdateAxesPositions().

bool NPlot::Legend::neverShiftAxes_ [private]
 

Definition at line 87 of file Legend.cs.

Referenced by Legend(), and UpdateAxesPositions().

Placement NPlot::Legend::verticalEdgePlacement_ [private]
 

Definition at line 86 of file Legend.cs.

Referenced by Legend(), and UpdateAxesPositions().

PlotSurface2D.XAxisPosition NPlot::Legend::xAttach_ [private]
 

Definition at line 83 of file Legend.cs.

Referenced by AttachTo(), Legend(), and UpdateAxesPositions().

int NPlot::Legend::xOffset_ [private]
 

Definition at line 81 of file Legend.cs.

Referenced by Legend().

PlotSurface2D.YAxisPosition NPlot::Legend::yAttach_ [private]
 

Definition at line 84 of file Legend.cs.

Referenced by AttachTo(), Legend(), and UpdateAxesPositions().

int NPlot::Legend::yOffset_ [private]
 

Definition at line 82 of file Legend.cs.

Referenced by Legend().


Property Documentation

Legend.Placement NPlot::Legend::HorizontalEdgePlacement [get, set]
 

Whether or not to attach the legend on the inside of the left or right axis (which, is specified using the AttachTo method) or the outside.

Definition at line 162 of file Legend.cs.

bool NPlot::Legend::NeverShiftAxes [get, set]
 

Whether or not the positions of the Axes may be shifted to make room for the Legend.

Definition at line 94 of file Legend.cs.

Legend.Placement NPlot::Legend::VerticalEdgePlacement [get, set]
 

Whether or not to attach the legend on the inside of the top or bottom axis (which, is specified using the AttachTo method) or the outside.

Definition at line 144 of file Legend.cs.

int NPlot::Legend::XOffset [get, set]
 

Offset from the chosen Y-Axis.

TODO: better description.

Definition at line 110 of file Legend.cs.

int NPlot::Legend::YOffset [get, set]
 

Offset from the X-Axis.

TODO: better description.

Definition at line 126 of file Legend.cs.


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