Public Member Functions | List of all members
LegendEntry Class Reference

Class for legend entry. More...

#include <legend.hpp>

Public Member Functions

 LegendEntry (Graph &graph, const std::string &label)
 Contructor for legend entry.
 
 LegendEntry (const LegendEntry &le)
 Copy constructor.
 
 ~LegendEntry ()
 Destructor.
 
LegendEntryoperator= (const LegendEntry &le)
 Assignment operator.
 
void plot (cairo_t *cairo, double x, double y)
 Plot legend entry at (x,y).
 
void get_size (cairo_t *cairo, double &width, double &height) const
 Get size of legend entry.
 
void set_font_size (double fontsize)
 Set font size for legend labels.
 

Detailed Description

Class for legend entry.

The legend entries contain a reference to the graph drawn so that if the style used in the graph is changed, the sample in legend is automatically changed.

Plotting of graph sample is done by plot_sample() in Graph.

Constructor & Destructor Documentation

LegendEntry::LegendEntry ( Graph graph,
const std::string &  label 
)
inline

Contructor for legend entry.

LegendEntry::LegendEntry ( const LegendEntry le)
inline

Copy constructor.

LegendEntry::~LegendEntry ( )
inline

Destructor.

Member Function Documentation

void LegendEntry::get_size ( cairo_t *  cairo,
double &  width,
double &  height 
) const

Get size of legend entry.

LegendEntry& LegendEntry::operator= ( const LegendEntry le)
inline

Assignment operator.

void LegendEntry::plot ( cairo_t *  cairo,
double  x,
double  y 
)

Plot legend entry at (x,y).

The point (x,y) is the lower left point of the entry.

void LegendEntry::set_font_size ( double  fontsize)

Set font size for legend labels.


The documentation for this class was generated from the following file: