Class for legend entry. More...
#include <legend.hpp>
Public Member Functions | |
LegendEntry (Graph &graph, const std::string &label) | |
Contructor for legend entry. More... | |
LegendEntry (const LegendEntry &le) | |
Copy constructor. More... | |
~LegendEntry () | |
Destructor. More... | |
LegendEntry & | operator= (const LegendEntry &le) |
Assignment operator. More... | |
void | plot (cairo_t *cairo, double x, double y) |
Plot legend entry at (x,y). More... | |
void | get_size (cairo_t *cairo, double &width, double &height) const |
Get size of legend entry. More... | |
void | set_font_size (double fontsize) |
Set font size for legend labels. More... | |
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.
|
inline |
Contructor for legend entry.
|
inline |
Copy constructor.
|
inline |
Destructor.
void LegendEntry::get_size | ( | cairo_t * | cairo, |
double & | width, | ||
double & | height | ||
) | const |
Get size of legend entry.
|
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.