12 #ifndef ROOT_TGLAxisPainter
13 #define ROOT_TGLAxisPainter
32 typedef std::pair <Float_t, Float_t> Lab_t;
33 typedef std::vector<Lab_t> LabVec_t;
34 typedef std::pair <Float_t, Int_t> TM_t;
35 typedef std::vector<TM_t> TMVec_t;
38 TGLAxisPainter(
const TGLAxisPainter&);
39 TGLAxisPainter& operator=(
const TGLAxisPainter&);
52 void LabelsLimits(
const char *label, Int_t &first, Int_t &last)
const;
53 void FormAxisValue(Double_t x, TString &s)
const;
57 Bool_t fUseAxisColors;
58 TGLFont::EMode fFontMode;
71 Int_t fLabelPixelFontSize;
72 Double_t fLabel3DFontSize;
73 Int_t fTitlePixelFontSize;
74 Double_t fTitle3DFontSize;
77 TGLFont::ETextAlignH_e fLabelAlignH;
78 TGLFont::ETextAlignV_e fLabelAlignV;
80 TPMERegexp *fAllZeroesRE;
84 virtual ~TGLAxisPainter();
87 Int_t GetTMNDim()
const {
return fTMNDim; }
88 void SetTMNDim(Int_t x) { fTMNDim = x; }
90 TGLVector3& RefDir() {
return fDir; }
91 TGLVector3& RefTMOff(Int_t i) {
return fTMOff[i]; }
93 TGLFont::EMode GetFontMode()
const {
return fFontMode; }
94 void SetFontMode(TGLFont::EMode m) { fFontMode=m; }
97 void SetLabelPixelFontSize(Int_t fs) { fLabelPixelFontSize=fs; }
98 Int_t GetLabelPixelFontSize()
const {
return fLabelPixelFontSize; }
99 void SetTitlePixelFontSize(Int_t fs) { fTitlePixelFontSize=fs; }
100 Int_t GetTitlePixelFontSize()
const {
return fTitlePixelFontSize; }
102 TGLVector3& RefTitlePos() {
return fTitlePos; }
105 void SetLabelAlign(TGLFont::ETextAlignH_e, TGLFont::ETextAlignV_e);
107 LabVec_t& RefLabVec() {
return fLabVec; }
108 TMVec_t& RefTMVec() {
return fTMVec; }
110 void SetAttAxis(TAttAxis* a) { fAttAxis = a; }
111 TAttAxis* GetAttAxis() {
return fAttAxis; }
113 void SetUseAxisColors(Bool_t x) { fUseAxisColors = x; }
114 Bool_t GetUseAxisColors()
const {
return fUseAxisColors; }
117 void SetLabelFont(TGLRnrCtx &rnrCtx,
const char* fontName, Int_t pixelSize = 64, Double_t font3DSize = -1);
118 void SetTitleFont(TGLRnrCtx &rnrCtx,
const char* fontName, Int_t pixelSize = 64, Double_t font3DSize = -1);
120 void SetTextFormat(Double_t min, Double_t max, Double_t binWidth);
123 void RnrText (
const TString &txt,
const TGLVector3 &pos, TGLFont::ETextAlignH_e aH, TGLFont::ETextAlignV_e aV,
const TGLFont &font)
const;
124 void RnrTitle(
const TString &title, TGLVector3 &pos, TGLFont::ETextAlignH_e aH, TGLFont::ETextAlignV_e aV)
const;
125 void RnrLabels()
const;
126 void RnrLines()
const;
128 void PaintAxis(TGLRnrCtx& ctx, TAxis* ax);
130 ClassDef(TGLAxisPainter, 0);
138 class TGLAxisPainterBox :
public TGLAxisPainter
141 TGLVector3 fAxisTitlePos[3];
146 virtual ~TGLAxisPainterBox();
148 void SetAxis3DTitlePos(TGLRnrCtx &rnrCtx);
149 void DrawAxis3D(TGLRnrCtx &rnrCtx);
151 void PlotStandard(TGLRnrCtx &rnrCtx, TH1* histo,
const TGLBoundingBox& bbox);
153 ClassDef(TGLAxisPainterBox, 0);