This creates a legend as pixels in a Grid2DObject. This should be used with/by a plugin that would then convert this Grid2DObject into a true graphic file (png, etc).
- Author
- Mathias Bavay
- Date
- 2011-12-23
#include <Graphics.h>
|
| Legend (const unsigned int &height, const double &minimum, const double &maximum) |
| Constructor. More...
|
|
const Array2D< double > | getLegend () const |
| Get the legend in an array The legend is coded as values between min and max (+background and text colors) in an array. This array can then be used alongside the data array to build the full plot. More...
|
|
|
static unsigned int | getLegendWidth () |
| Get the actual width of the legend This is constant but depends on various parameters of the legend: font size, number of characters, spacing etc. More...
|
|
◆ Legend()
mio::Legend::Legend |
( |
const unsigned int & |
height, |
|
|
const double & |
minimum, |
|
|
const double & |
maximum |
|
) |
| |
Constructor.
- Parameters
-
height | available height of the plot (for centering the legend) |
minimum | start value of the legend |
maximum | end value of the legend |
◆ getLegend()
const Array2D< double > mio::Legend::getLegend |
( |
| ) |
const |
Get the legend in an array The legend is coded as values between min and max (+background and text colors) in an array. This array can then be used alongside the data array to build the full plot.
- Returns
- legend array
◆ getLegendWidth()
unsigned int mio::Legend::getLegendWidth |
( |
| ) |
|
|
static |
Get the actual width of the legend This is constant but depends on various parameters of the legend: font size, number of characters, spacing etc.
- Returns
- width of the legend
◆ bg_color
marker for solid background
◆ text_color
The documentation for this class was generated from the following files: