Logo ROOT   6.21/01
Reference Guide
TAxisModLab.cxx
Go to the documentation of this file.
1 // @(#)root/graf:$Id$
2 // Author: Olivier Couet
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #include <stdlib.h>
13 
14 #include "Riostream.h"
15 #include "TROOT.h"
16 #include "TAxisModLab.h"
17 
19 
20 /** \class TAxisModLab
21 \ingroup BasicGraphics
22 
23 TAxis helper class used to store the modified labels.
24 */
25 
26 ////////////////////////////////////////////////////////////////////////////////
27 /// TAxisModLab default constructor.
28 
30  fLabNum = 0;
31  fTextAngle = -1.;
32  fTextSize = -1.;
33  fTextAlign = -1;
34  fTextColor = -1;
35  fTextFont = -1;
36  fLabText = "";
37 }
38 
39 ////////////////////////////////////////////////////////////////////////////////
40 /// Set modified label number.
41 
43  if (l!=0) fLabNum = l;
44 }
45 
46 ////////////////////////////////////////////////////////////////////////////////
47 /// Set modified label angle.
48 
50  if (a>=0.) fTextAngle = a;
51 }
52 
53 ////////////////////////////////////////////////////////////////////////////////
54 /// Set modified label size.
55 
57  if (s>=0.) fTextSize = s;
58 }
59 
60 ////////////////////////////////////////////////////////////////////////////////
61 /// Set modified label alignment.
62 
64  if (a>0) fTextAlign = a;
65 }
66 
67 ////////////////////////////////////////////////////////////////////////////////
68 /// Set modified label color.
69 
71  if (c>0) fTextColor = c;
72 }
73 
74 ////////////////////////////////////////////////////////////////////////////////
75 /// Set modified label font.
76 
78  if (f>0) fTextFont = 0;
79 }
80 
81 ////////////////////////////////////////////////////////////////////////////////
82 /// Set modified label text.
83 
85  fLabText = s;
86 }
void SetText(TString t="")
Set modified label text.
Definition: TAxisModLab.cxx:84
Basic string class.
Definition: TString.h:131
#define f(i)
Definition: RSha256.hxx:104
int Int_t
Definition: RtypesCore.h:41
void SetFont(Int_t f=-1)
Set modified label font.
Definition: TAxisModLab.cxx:77
void SetAlign(Int_t a=-1)
Set modified label alignment.
Definition: TAxisModLab.cxx:63
TAxisModLab()
TAxisModLab default constructor.
Definition: TAxisModLab.cxx:29
void SetAngle(Double_t a=-1.)
Set modified label angle.
Definition: TAxisModLab.cxx:49
void SetColor(Int_t c=-1)
Set modified label color.
Definition: TAxisModLab.cxx:70
static constexpr double s
Float_t fTextAngle
Text angle.
Definition: TAttText.h:21
Int_t fLabNum
Label number.
Definition: TAxisModLab.h:25
auto * a
Definition: textangle.C:12
void SetSize(Double_t s=-1.)
Set modified label size.
Definition: TAxisModLab.cxx:56
Font_t fTextFont
Text font.
Definition: TAttText.h:25
void SetLabNum(Int_t n=0)
Set modified label number.
Definition: TAxisModLab.cxx:42
#define ClassImp(name)
Definition: Rtypes.h:365
TString fLabText
Label text.
Definition: TAxisModLab.h:26
TAxis helper class used to store the modified labels.
Definition: TAxisModLab.h:21
double Double_t
Definition: RtypesCore.h:55
Float_t fTextSize
Text size.
Definition: TAttText.h:22
auto * l
Definition: textangle.C:4
#define c(i)
Definition: RSha256.hxx:101
Color_t fTextColor
Text color.
Definition: TAttText.h:24
Short_t fTextAlign
Text alignment.
Definition: TAttText.h:23