ROOT  6.06/09
Reference Guide
TAttText.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Rene Brun 12/12/94
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 #ifndef ROOT_TAttText
13 #define ROOT_TAttText
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TAttText //
19 // //
20 // Text attributes. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_Rtypes
25 #include "Rtypes.h"
26 #endif
27 #ifndef ROOT_Riosfwd
28 #include "Riosfwd.h"
29 #endif
30 
31 
32 class TAttText {
33 
34 protected:
35  Float_t fTextAngle; //Text angle
36  Float_t fTextSize; //Text size
37  Short_t fTextAlign; //Text alignment
38  Color_t fTextColor; //Text color index
39  Font_t fTextFont; //Text font number
40 
41 public:
42  TAttText();
43  TAttText(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize);
44  virtual ~TAttText();
45  void Copy(TAttText &atttext) const;
46  virtual Short_t GetTextAlign() const {return fTextAlign;}
47  virtual Float_t GetTextAngle() const {return fTextAngle;}
48  virtual Color_t GetTextColor() const {return fTextColor;}
49  virtual Font_t GetTextFont() const {return fTextFont;}
50  virtual Float_t GetTextSize() const {return fTextSize;}
51  virtual void Modify();
52  virtual void ResetAttText(Option_t *toption="");
53  virtual void SaveTextAttributes(std::ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1);
54  virtual void SetTextAttributes(); // *MENU*
55  virtual void SetTextAlign(Short_t align=11) { fTextAlign = align;}
56  virtual void SetTextAngle(Float_t tangle=0) { fTextAngle = tangle;} // *MENU*
57  virtual void SetTextColor(Color_t tcolor=1) { fTextColor = tcolor;}
58  virtual void SetTextColorAlpha(Color_t tcolor, Float_t talpha);
59  virtual void SetTextFont(Font_t tfont=62) { fTextFont = tfont;}
60  virtual void SetTextSize(Float_t tsize=1) { fTextSize = tsize;}
61  virtual void SetTextSizePixels(Int_t npixels);
62 
63  ClassDef(TAttText,2) //Text attributes
64 };
65 
68 
69 #endif
70 
virtual Float_t GetTextAngle() const
Definition: TAttText.h:47
virtual Font_t GetTextFont() const
Definition: TAttText.h:49
short Style_t
Definition: RtypesCore.h:76
virtual void ResetAttText(Option_t *toption="")
Reset this text attributes to default values.
Definition: TAttText.cxx:332
float Float_t
Definition: RtypesCore.h:53
void Copy(TAttText &atttext) const
Copy this text attributes to a new TAttText.
Definition: TAttText.cxx:291
const char Option_t
Definition: RtypesCore.h:62
virtual Float_t GetTextSize() const
Definition: TAttText.h:50
virtual void SetTextAttributes()
Invoke the DialogCanvas Text attributes.
Definition: TAttText.cxx:372
int Int_t
Definition: RtypesCore.h:41
short Font_t
Definition: RtypesCore.h:75
virtual void SetTextSizePixels(Int_t npixels)
Set the text size in pixels.
Definition: TAttText.cxx:393
virtual void Modify()
Change current text attributes if necessary.
Definition: TAttText.cxx:303
virtual void SetTextFont(Font_t tfont=62)
Definition: TAttText.h:59
virtual Short_t GetTextAlign() const
Definition: TAttText.h:46
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual Color_t GetTextColor() const
Definition: TAttText.h:48
char * out
Definition: TBase64.cxx:29
short Color_t
Definition: RtypesCore.h:79
virtual void SetTextAlign(Short_t align=11)
Definition: TAttText.h:55
Float_t fTextAngle
Definition: TAttText.h:35
virtual void SaveTextAttributes(std::ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1)
Save text attributes as C++ statement(s) on output stream out.
Definition: TAttText.cxx:344
virtual void SetTextAngle(Float_t tangle=0)
Definition: TAttText.h:56
Text Attributes class.
Definition: TAttText.h:32
short Short_t
Definition: RtypesCore.h:35
Font_t fTextFont
Definition: TAttText.h:39
ETextAlign
Definition: TAttText.h:66
virtual void SetTextColorAlpha(Color_t tcolor, Float_t talpha)
Set a transparent marker color.
Definition: TAttText.cxx:382
Float_t fTextSize
Definition: TAttText.h:36
#define name(a, b)
Definition: linkTestLib0.cpp:5
virtual void SetTextColor(Color_t tcolor=1)
Definition: TAttText.h:57
virtual ~TAttText()
AttText destructor.
Definition: TAttText.cxx:284
virtual void SetTextSize(Float_t tsize=1)
Definition: TAttText.h:60
Color_t fTextColor
Definition: TAttText.h:38
Short_t fTextAlign
Definition: TAttText.h:37