NPlot::LegendBase Class Reference

Provides functionality for drawing legends. More...

Inheritance diagram for NPlot::LegendBase:

NPlot::Legend List of all members.

Public Types

enum  BorderType { None = 0, Line = 1, Shadow = 2 }
 The types of legend borders (enum). More...

Public Member Functions

 LegendBase ()
 Constructor.
Rectangle GetBoundingBox (Point position, ArrayList plots, float scale)
 Get the bounding box of the rectangle.
Rectangle Draw (Graphics g, Point position, ArrayList plots, float scale)
 Draw The legend.

Properties

Font Font
 The font used to draw text in the legend.
Font font_
Color TextColor
 The color used to draw text in the legend.
Color textColor_
Color BackgroundColor
 The background color of the legend.
Color bgColor_
Color BorderColor
 The color of the legend border.
Color borderColor_
Legend.BorderType BorderStyle
 The border style to use for the legend.
NPlot.Legend.BorderType borderStyle_
bool AutoScaleText
 Whether or not to auto scale text in the legend according the physical dimensions of the plot surface.
bool autoScaleText_
int NumberItemsVertically
 Setting this does two things.
int numberItemsVertically_ = -1
int NumberItemsHorizontally
 Setting this does two things.
int numberItemsHorizontally_ = 1

Detailed Description

Provides functionality for drawing legends.

The class is quite closely tied to PlotSurface2D.

Definition at line 65 of file LegendBase.cs.


Member Enumeration Documentation

enum NPlot::LegendBase::BorderType
 

The types of legend borders (enum).

Enumerator:
None  No border.
Line  Line border.
Shadow  Shaded border.

Definition at line 373 of file LegendBase.cs.


Constructor & Destructor Documentation

NPlot::LegendBase::LegendBase  )  [inline]
 

Constructor.

Definition at line 71 of file LegendBase.cs.

References Font.


Member Function Documentation

Rectangle NPlot::LegendBase::Draw Graphics  g,
Point  position,
ArrayList  plots,
float  scale
[inline]
 

Draw The legend.

Parameters:
g The graphics surface on which to draw
position The position of the top left of the axis.
plots Array of plot objects to appear in the legend.
scale if the legend is set to scale, the amount to scale by.
Returns:
bounding box

Definition at line 106 of file LegendBase.cs.

References AutoScaleText, bgColor_, borderColor_, BorderStyle, NPlot::IPlot::DrawInLegend(), Font, font_, NPlot::IPlot::Label, Line, numberItemsHorizontally_, numberItemsVertically_, Shadow, NPlot::IPlot::ShowInLegend, and textColor_.

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

Rectangle NPlot::LegendBase::GetBoundingBox Point  position,
ArrayList  plots,
float  scale
[inline]
 

Get the bounding box of the rectangle.

Parameters:
position the position of the top left of the legend.
plots Array of plot objects to appear in the legend.
scale if the legend is set to scale, the amount to scale by.
>
Returns:
do implementation that doesn't call draw. Change xPos, yPos to PointF

Definition at line 90 of file LegendBase.cs.


Property Documentation

bool NPlot::LegendBase::AutoScaleText [get, set]
 

Whether or not to auto scale text in the legend according the physical dimensions of the plot surface.

Definition at line 413 of file LegendBase.cs.

Referenced by Draw().

bool NPlot::LegendBase::autoScaleText_ [private]
 

Definition at line 423 of file LegendBase.cs.

Color NPlot::LegendBase::BackgroundColor [get, set]
 

The background color of the legend.

Definition at line 340 of file LegendBase.cs.

Color NPlot::LegendBase::bgColor_ [private]
 

Definition at line 350 of file LegendBase.cs.

Referenced by Draw().

Color NPlot::LegendBase::BorderColor [get, set]
 

The color of the legend border.

Definition at line 357 of file LegendBase.cs.

Color NPlot::LegendBase::borderColor_ [private]
 

Definition at line 367 of file LegendBase.cs.

Referenced by Draw().

Legend.BorderType NPlot::LegendBase::BorderStyle [get, set]
 

The border style to use for the legend.

Definition at line 395 of file LegendBase.cs.

Referenced by Draw().

NPlot.Legend.BorderType NPlot::LegendBase::borderStyle_ [private]
 

Definition at line 405 of file LegendBase.cs.

Font NPlot::LegendBase::Font [get, set]
 

The font used to draw text in the legend.

Definition at line 306 of file LegendBase.cs.

Referenced by Draw(), and LegendBase().

Font NPlot::LegendBase::font_ [private]
 

Definition at line 316 of file LegendBase.cs.

Referenced by Draw().

int NPlot::LegendBase::NumberItemsHorizontally [set]
 

Setting this does two things.

First of all, it sets the maximum number of items in the legend horizontally. Second of all, it makes the legend grow vertically (as it must given this constraint).

Definition at line 448 of file LegendBase.cs.

int NPlot::LegendBase::numberItemsHorizontally_ = 1 [private]
 

Definition at line 455 of file LegendBase.cs.

Referenced by Draw().

int NPlot::LegendBase::NumberItemsVertically [set]
 

Setting this does two things.

First of all, it sets the maximum number of items in the legend vertically. Second of all, it makes the legend grow horizontally (as it must given this constraint).

Definition at line 432 of file LegendBase.cs.

int NPlot::LegendBase::numberItemsVertically_ = -1 [private]
 

Definition at line 439 of file LegendBase.cs.

Referenced by Draw().

Color NPlot::LegendBase::TextColor [get, set]
 

The color used to draw text in the legend.

Definition at line 323 of file LegendBase.cs.

Color NPlot::LegendBase::textColor_ [private]
 

Definition at line 333 of file LegendBase.cs.

Referenced by Draw().


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