1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#ifndef LEGEND_H
#define LEGEND_H
#include <cairomm/context.h>
class XYPlot;
class Legend {
public:
Legend();
void Initialize(const Cairo::RefPtr<Cairo::Context>& cairo,
const XYPlot& plot);
double Height() const { return _height; }
double Width() const { return _width; }
void SetPosition(double x, double y) {
_x = x;
_y = y;
}
void Draw(const Cairo::RefPtr<Cairo::Context>& cairo,
const XYPlot& plot) const;
private:
double _sizeOfM, _xBearing, _yBearing, _textAdvance;
double _x, _y, _width, _height;
};
#endif
|