C# Class NPlot.LegendBase

Provides functionality for drawing legends.
The class is very closely tied to PlotSurface2D.
Show file Open project: mono/nplot-gtk

Public Methods

Method Description
Draw ( Graphics g, Point position, ArrayList plots, float scale ) : Xwt.Rectangle

Draw The legend

GetBoundingBox ( Point position, ArrayList plots, float scale ) : Xwt.Rectangle

Get the bounding box of the rectangle.

do implementation that doesn't call draw. Change xPos, yPos to PointF

LegendBase ( ) : System

Constructor.

Method Details

Draw() public method

Draw The legend
public Draw ( Graphics g, Point position, ArrayList plots, float scale ) : Xwt.Rectangle
g Graphics The graphics surface on which to draw
position Point The position of the top left of the axis.
plots System.Collections.ArrayList Array of plot objects to appear in the legend.
scale float if the legend is set to scale, the amount to scale by.
return Xwt.Rectangle

GetBoundingBox() public method

Get the bounding box of the rectangle.
do implementation that doesn't call draw. Change xPos, yPos to PointF
public GetBoundingBox ( Point position, ArrayList plots, float scale ) : Xwt.Rectangle
position Point the position of the top left of the legend.
plots System.Collections.ArrayList Array of plot objects to appear in the legend.
scale float if the legend is set to scale, the amount to scale by.
return Xwt.Rectangle

LegendBase() public method

Constructor.
public LegendBase ( ) : System
return System