73 #define LEGEND_POS_VERTICAL_MASK 12
74 #define LEGEND_POS_HORIZONTAL_MASK 3
76 #define LEGEND_POS_BOTTOM 0
77 #define LEGEND_POS_MIDDLE 4
78 #define LEGEND_POS_TOP 8
80 #define LEGEND_POS_LEFT 0
81 #define LEGEND_POS_CENTER 1
82 #define LEGEND_POS_RIGHT 2
103 : _graph(graph), _label(label) {}
108 : _graph(le._graph), _label(le._label) {}
126 void plot( cairo_t *cairo,
double x,
double y );
130 void get_size( cairo_t *cairo,
double &width,
double &height )
const;
165 virtual void plot( cairo_t *cairo,
double x,
double y ) = 0;
169 virtual void get_size( cairo_t *cairo,
double &width,
double &height )
const = 0;
178 std::vector<LegendEntry *> _entry;
194 virtual void plot( cairo_t *cairo,
double x,
double y );
198 virtual void get_size( cairo_t *cairo,
double &width,
double &height )
const;
236 virtual void plot( cairo_t *cairo,
double x,
double y );
240 virtual void get_size( cairo_t *cairo,
double &width,
double &height )
const;
LegendEntry(Graph &graph, const std::string &label)
Contructor for legend entry.
Definition: legend.hpp:102
Definition: legend.hpp:65
void get_size(cairo_t *cairo, double &width, double &height) const
Get size of legend entry.
Definition: legend.hpp:68
LegendEntry(const LegendEntry &le)
Copy constructor.
Definition: legend.hpp:107
Abstract base class for drawable plots.
Definition: graph.hpp:56
~LegendEntry()
Destructor.
Definition: legend.hpp:112
Definition: legend.hpp:64
Base for plottable graphs.
virtual void plot(cairo_t *cairo, double x, double y)
Plot legend at (x,y).
Legend()
Default constructor for legend.
Definition: legend.hpp:155
MultiEntryLegend()
Default constructor for legend.
virtual void get_size(cairo_t *cairo, double &width, double &height) const
Get size of legend.
virtual void plot(cairo_t *cairo, double x, double y)=0
Plot legend at (x,y).
virtual ~MultiEntryLegend()
Virtual destructor.
Definition: legend.hpp:188
Definition: legend.hpp:61
void plot(cairo_t *cairo, double x, double y)
Plot legend entry at (x,y).
Class for labels in plots.
Definition: label.hpp:57
Definition: legend.hpp:67
Class for colormap type plots.
Definition: colormap.hpp:74
void set_height(double height)
Set height of legend.
virtual void plot(cairo_t *cairo, double x, double y)
Plot legend at (x,y).
void add_entry(LegendEntry *entry)
Add entry to legend.
virtual void get_size(cairo_t *cairo, double &width, double &height) const =0
Get size of legend.
Definition: legend.hpp:63
Class for legend entry.
Definition: legend.hpp:93
void set_font_size(double fontsize)
Set font size for legend labels.
virtual ~ColormapLegend()
Virtual destructor.
Definition: legend.hpp:230
Base class for legend definition.
Definition: legend.hpp:149
Colormap graph for plotting
virtual ~Legend()
Virtual destructor.
Definition: legend.hpp:159
legend_position_e
Legend position.
Definition: legend.hpp:58
virtual void get_size(cairo_t *cairo, double &width, double &height) const
Get size of legend.
Legend for presenting colormap key.
Definition: legend.hpp:216
ColormapLegend(Colormap &colormap)
Default constructor for legend.
Definition: legend.hpp:226
Definition: legend.hpp:59
LegendEntry & operator=(const LegendEntry &le)
Assignment operator.
Definition: legend.hpp:116
void clear_entries(void)
Clear legend entries.
void set_font_size(double fontsize)
Set font size for legend labels.
Definition: legend.hpp:69
Legend for presenting plot styles.
Definition: legend.hpp:175
Definition: legend.hpp:60