Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
18 ClassImp(TAxisModLab);
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 
29 TAxisModLab::TAxisModLab() {
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 
42 void TAxisModLab::SetLabNum(Int_t l) {
43  if (l!=0) fLabNum = l;
44 }
45 
46 ////////////////////////////////////////////////////////////////////////////////
47 /// Set modified label angle.
48 
49 void TAxisModLab::SetAngle(Double_t a) {
50  if (a>=0.) fTextAngle = a;
51 }
52 
53 ////////////////////////////////////////////////////////////////////////////////
54 /// Set modified label size.
55 
56 void TAxisModLab::SetSize(Double_t s) {
57  if (s>=0.) fTextSize = s;
58 }
59 
60 ////////////////////////////////////////////////////////////////////////////////
61 /// Set modified label alignment.
62 
63 void TAxisModLab::SetAlign(Int_t a) {
64  if (a>0) fTextAlign = a;
65 }
66 
67 ////////////////////////////////////////////////////////////////////////////////
68 /// Set modified label color.
69 
70 void TAxisModLab::SetColor(Int_t c) {
71  if (c>0) fTextColor = c;
72 }
73 
74 ////////////////////////////////////////////////////////////////////////////////
75 /// Set modified label font.
76 
77 void TAxisModLab::SetFont(Int_t f) {
78  if (f>0) fTextFont = 0;
79 }
80 
81 ////////////////////////////////////////////////////////////////////////////////
82 /// Set modified label text.
83 
84 void TAxisModLab::SetText(TString s) {
85  fLabText = s;
86 }