Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
FillStyle.h
1/*
2 * FillStyle.h
3 *
4 * Created on: 30 lip 2024
5 * Author: daniel
6 */
7
8#ifndef HAL_FEATURES_HIST_STYLES_FILLSTYLE_H_
9#define HAL_FEATURES_HIST_STYLES_FILLSTYLE_H_
10
11#include <RtypesCore.h>
12
13#include "Style.h"
14
15namespace Hal {
19 class FillStyle : public Style {
20 public:
21 static const unsigned short int kColor;
22 static const unsigned short int kStyle;
23 FillStyle() {};
24
25 void SetColor(Int_t val);
26
27 void SetStyle(Int_t val);
28
29 Int_t GetColor() const;
30
31 Int_t GetStyle() const;
32
33 void ExportToXML(XMLNode* node) const;
34
35 void ImportFromXML(XMLNode* node);
36
37 template<class T>
38 void Apply(T& x) const;
39
40 virtual ~FillStyle() {};
41 ClassDef(FillStyle, 1);
42 };
43
44} /* namespace Hal */
45
46template<class T>
47inline void Hal::FillStyle::Apply(T& x) const {
48 if (Find(kColor)) x.SetFillColor(GetI(kColor));
49 if (Find(kStyle)) x.SetFillStyle(GetI(kStyle));
50}
51
52#endif /* HAL_FEATURES_HIST_STYLES_FILLSTYLE_H_ */
Bool_t Find(Int_t bit) const
Definition Style.h:55