1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
2 | // Classe traceur d histogramme 96-99
|
---|
3 | // C. Magneville / R. Ansari 2000-2007
|
---|
4 | // CEA-DAPNIA LAL-IN2P3/CNRS
|
---|
5 |
|
---|
6 | #ifndef PIHISTO_H
|
---|
7 | #define PIHISTO_H
|
---|
8 |
|
---|
9 | #include "pidrawer.h"
|
---|
10 | #include "phistwrapper.h"
|
---|
11 |
|
---|
12 |
|
---|
13 | class PIHisto : public PIDrawer {
|
---|
14 | public:
|
---|
15 | PIHisto(P1DHistoWrapper* histowp, bool ad=true);
|
---|
16 | virtual ~PIHisto();
|
---|
17 | virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
|
---|
18 | virtual void UpdateLimits();
|
---|
19 |
|
---|
20 | inline P1DHistoWrapper* HistoWrapper() {return(mHistoWp);}
|
---|
21 |
|
---|
22 | // Methode de decodage des options
|
---|
23 | virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
|
---|
24 | virtual int OptionToString(vector<string> & opt) const;
|
---|
25 | virtual void GetOptionsHelpInfo(string& info);
|
---|
26 |
|
---|
27 | // Renvoie une distance au point x,y
|
---|
28 | virtual double GetDistanceToPoint(double x, double y);
|
---|
29 |
|
---|
30 | protected:
|
---|
31 | virtual void DrawStats(PIGraphicUC* g);
|
---|
32 | P1DHistoWrapper* mHistoWp;
|
---|
33 | bool mAdDO;
|
---|
34 | bool stats; // if true: draw text with statistical information
|
---|
35 | bool filled; // if true: fill histo with fg color
|
---|
36 | bool pline; // if true: draw histogram as polyline
|
---|
37 | bool error; // if true: draw error bars
|
---|
38 | double spoX, spoY; // Stat pos offset par rapport a position defaut
|
---|
39 | };
|
---|
40 |
|
---|
41 | #endif
|
---|