Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TAxisModLab.cxx
Go to the documentation of this file.
1// @(#)root/graf:$Id$
2// Author: Olivier Couet
3
4/*************************************************************************
5 * Copyright (C) 1995-2003, 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 <cstdlib>
13
14#include "TAxisModLab.h"
15
17
18/** \class TAxisModLab
19\ingroup BasicGraphics
20
21TAxis helper class used to store the modified labels.
22*/
23
24////////////////////////////////////////////////////////////////////////////////
25/// TAxisModLab default constructor.
26
28{
29 fLabNum = 0;
30 fLabValue = 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{
44 if (l != 0) fLabNum = l;
45}
46
47////////////////////////////////////////////////////////////////////////////////
48/// Set modified label value.
49
51{
52 fLabNum = 0;
53 fLabValue = v;
54}
55
56////////////////////////////////////////////////////////////////////////////////
57/// Set modified label angle.
58
60{
61 if (a >= 0.) fTextAngle = a;
62}
63
64////////////////////////////////////////////////////////////////////////////////
65/// Set modified label size.
66
68{
69 if (s >= 0.) fTextSize = s;
70}
71
72////////////////////////////////////////////////////////////////////////////////
73/// Set modified label alignment.
74
76{
77 if (a > 0) fTextAlign = a;
78}
79
80////////////////////////////////////////////////////////////////////////////////
81/// Set modified label color.
82
84{
85 if (c > 0) fTextColor = c;
86}
87
88////////////////////////////////////////////////////////////////////////////////
89/// Set modified label font.
90
92{
93 if (f > 0) fTextFont = f;
94}
95
96////////////////////////////////////////////////////////////////////////////////
97/// Set modified label text.
98
100{
101 fLabText = s;
102}
#define f(i)
Definition RSha256.hxx:104
#define c(i)
Definition RSha256.hxx:101
#define a(i)
Definition RSha256.hxx:99
#define ClassImp(name)
Definition Rtypes.h:382
Color_t fTextColor
Text color.
Definition TAttText.h:24
Float_t fTextAngle
Text angle.
Definition TAttText.h:21
Font_t fTextFont
Text font.
Definition TAttText.h:25
Short_t fTextAlign
Text alignment.
Definition TAttText.h:23
Float_t fTextSize
Text size.
Definition TAttText.h:22
TAxis helper class used to store the modified labels.
Definition TAxisModLab.h:21
Int_t fLabNum
Label number.
Definition TAxisModLab.h:24
void SetColor(Int_t c=-1)
Set modified label color.
void SetSize(Double_t s=-1.)
Set modified label size.
void SetFont(Int_t f=-1)
Set modified label font.
void SetText(TString t="")
Set modified label text.
void SetLabValue(Double_t v=0.)
Set modified label value.
void SetAlign(Int_t a=-1)
Set modified label alignment.
void SetLabNum(Int_t n=0)
Set modified label number.
TString fLabText
Alternative label text.
Definition TAxisModLab.h:26
void SetAngle(Double_t a=-1.)
Set modified label angle.
TAxisModLab()
TAxisModLab default constructor.
Double_t fLabValue
Label value, used when label number is 0.
Definition TAxisModLab.h:25
Basic string class.
Definition TString.h:139
TLine l
Definition textangle.C:4