Logo ROOT  
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 #include "Rtypes.h"
17 
18 class TAttText {
19 
20 protected:
21  Float_t fTextAngle; ///< Text angle
22  Float_t fTextSize; ///< Text size
23  Short_t fTextAlign; ///< Text alignment
24  Color_t fTextColor; ///< Text color
25  Font_t fTextFont; ///< Text font
26 
27 public:
29  TAttText(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize);
30  virtual ~TAttText();
31  void Copy(TAttText &atttext) const;
32  virtual Short_t GetTextAlign() const {return fTextAlign;} ///< Return the text alignment
33  virtual Float_t GetTextAngle() const {return fTextAngle;} ///< Return the text angle
34  virtual Color_t GetTextColor() const {return fTextColor;} ///< Return the text color
35  virtual Font_t GetTextFont() const {return fTextFont;} ///< Return the text font
36  virtual Float_t GetTextSize() const {return fTextSize;} ///< Return the text size
37  virtual void Modify();
38  virtual void ResetAttText(Option_t *toption="");
39  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);
40  virtual void SetTextAttributes(); // *MENU*
41  virtual void SetTextAlign(Short_t align=11) { fTextAlign = align;} ///< Set the text alignment
42  virtual void SetTextAngle(Float_t tangle=0) { fTextAngle = tangle;} ///< Set the text angle
43  virtual void SetTextColor(Color_t tcolor=1) { fTextColor = tcolor;} ///< Set the text color
44  virtual void SetTextColorAlpha(Color_t tcolor, Float_t talpha);
45  virtual void SetTextFont(Font_t tfont=62) { fTextFont = tfont;} ///< Set the text font
46  virtual void SetTextSize(Float_t tsize=1) { fTextSize = tsize;} ///< Set the text size
47  virtual void SetTextSizePixels(Int_t npixels);
48 
49  ClassDef(TAttText,2) //Text attributes
50 };
51 
54 
55 #endif
56 
TAttText
Definition: TAttText.h:18
Style_t
short Style_t
Definition: RtypesCore.h:80
TAttText::~TAttText
virtual ~TAttText()
AttText destructor.
Definition: TAttText.cxx:284
kVAlignBottom
@ kVAlignBottom
Definition: TAttText.h:53
TAttText::fTextAlign
Short_t fTextAlign
Text alignment.
Definition: TAttText.h:29
kVAlignTop
@ kVAlignTop
Definition: TAttText.h:53
TAttText::SaveTextAttributes
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
TAttText::TAttText
TAttText()
AttText default constructor.
Definition: TAttText.cxx:254
Float_t
float Float_t
Definition: RtypesCore.h:57
ETextAlign
ETextAlign
Definition: TAttText.h:52
Int_t
int Int_t
Definition: RtypesCore.h:45
TAttText::Copy
void Copy(TAttText &atttext) const
Copy this text attributes to a new TAttText.
Definition: TAttText.cxx:291
Font_t
short Font_t
Definition: RtypesCore.h:79
TAttText::fTextSize
Float_t fTextSize
Text size.
Definition: TAttText.h:28
TAttText::fTextAngle
Float_t fTextAngle
Text angle.
Definition: TAttText.h:27
SetTextAngle
tt SetTextAngle(45)
kHAlignRight
@ kHAlignRight
Definition: TAttText.h:52
Color_t
short Color_t
Definition: RtypesCore.h:83
TAttText::ResetAttText
virtual void ResetAttText(Option_t *toption="")
Reset this text attributes to default values.
Definition: TAttText.cxx:332
kHAlignCenter
@ kHAlignCenter
Definition: TAttText.h:52
TAttText::Modify
virtual void Modify()
Change current text attributes if necessary.
Definition: TAttText.cxx:303
TAttText::fTextColor
Color_t fTextColor
Text color.
Definition: TAttText.h:30
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
kHAlignLeft
@ kHAlignLeft
Definition: TAttText.h:52
SetTextColor
pt SetTextColor(4)
Short_t
short Short_t
Definition: RtypesCore.h:39
kVAlignCenter
@ kVAlignCenter
Definition: TAttText.h:53
SetTextAlign
th1 SetTextAlign(11)
TAttText::SetTextSizePixels
virtual void SetTextSizePixels(Int_t npixels)
Set the text size in pixels.
Definition: TAttText.cxx:393
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TAttText::SetTextColorAlpha
virtual void SetTextColorAlpha(Color_t tcolor, Float_t talpha)
Set a transparent marker color.
Definition: TAttText.cxx:382
name
char name[80]
Definition: TGX11.cxx:110
TAttText::fTextFont
Font_t fTextFont
Text font.
Definition: TAttText.h:31
SetTextFont
pt SetTextFont(42)
TAttText::SetTextAttributes
virtual void SetTextAttributes()
Invoke the DialogCanvas Text attributes.
Definition: TAttText.cxx:372
SetTextSize
th1 SetTextSize(0.12)
Rtypes.h
int