Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
18class TColorNumber;
19
20class TAttText {
21
22protected:
23 Float_t fTextAngle; ///< Text angle
24 Float_t fTextSize; ///< Text size
25 Short_t fTextAlign; ///< Text alignment
26 Color_t fTextColor; ///< Text color
27 Font_t fTextFont; ///< Text font
28
29public:
30 TAttText();
31 TAttText(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize);
32 virtual ~TAttText();
33 void Copy(TAttText &atttext) const;
34 virtual Short_t GetTextAlign() const {return fTextAlign;} ///< Return the text alignment
35 virtual Float_t GetTextAngle() const {return fTextAngle;} ///< Return the text angle
36 virtual Color_t GetTextColor() const {return fTextColor;} ///< Return the text color
37 virtual Font_t GetTextFont() const {return fTextFont;} ///< Return the text font
38 virtual Float_t GetTextSize() const {return fTextSize;} ///< Return the text size
39 virtual Float_t GetTextSizePercent(Float_t size); ///< Return the text in percent of the pad size
40 virtual void Modify();
41 virtual void ResetAttText(Option_t *toption="");
42 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);
43 virtual void SetTextAttributes(); // *MENU*
44 virtual void SetTextAlign(Short_t align=11) { fTextAlign = align;} ///< Set the text alignment
45 virtual void SetTextAngle(Float_t tangle=0) { fTextAngle = tangle;} ///< Set the text angle
46 virtual void SetTextColor(Color_t tcolor=1) { fTextColor = tcolor;} ///< Set the text color
48 virtual void SetTextFont(Font_t tfont=62) { fTextFont = tfont;} ///< Set the text font
49 virtual void SetTextSize(Float_t tsize=1) { fTextSize = tsize;} ///< Set the text size
50 virtual void SetTextSizePixels(Int_t npixels); ///< Set the text size in pixel
51
53
54 ClassDef(TAttText,2) //Text attributes
55};
56
59
60#endif
61
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
short Style_t
Definition RtypesCore.h:82
int Int_t
Definition RtypesCore.h:45
short Color_t
Definition RtypesCore.h:85
float Float_t
Definition RtypesCore.h:57
short Font_t
Definition RtypesCore.h:81
short Short_t
Definition RtypesCore.h:39
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:342
ETextAlign
Definition TAttText.h:57
@ kVAlignTop
Definition TAttText.h:58
@ kVAlignCenter
Definition TAttText.h:58
@ kHAlignLeft
Definition TAttText.h:57
@ kVAlignBottom
Definition TAttText.h:58
@ kHAlignCenter
Definition TAttText.h:57
@ kHAlignRight
Definition TAttText.h:57
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint angle
Option_t toption
char name[80]
Definition TGX11.cxx:110
Text Attributes class.
Definition TAttText.h:20
virtual Float_t GetTextSize() const
Return the text size.
Definition TAttText.h:38
virtual void Modify()
Change current text attributes if necessary.
Definition TAttText.cxx:329
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
Definition TAttText.h:44
virtual Short_t GetTextAlign() const
Return the text alignment.
Definition TAttText.h:34
virtual Font_t GetTextFont() const
Return the text font.
Definition TAttText.h:37
Color_t fTextColor
Text color.
Definition TAttText.h:26
Float_t fTextAngle
Text angle.
Definition TAttText.h:23
TAttText()
AttText default constructor.
Definition TAttText.cxx:257
virtual void SetTextColorAlpha(Color_t tcolor, Float_t talpha)
Set a transparent text color.
Definition TAttText.cxx:412
virtual Color_t GetTextColor() const
Return the text color.
Definition TAttText.h:36
virtual ~TAttText()
AttText destructor.
Definition TAttText.cxx:287
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
Definition TAttText.h:45
virtual Float_t GetTextAngle() const
Return the text angle.
Definition TAttText.h:35
virtual void SetTextAttributes()
Invoke the DialogCanvas Text attributes.
Definition TAttText.cxx:400
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
Definition TAttText.h:46
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
Definition TAttText.h:48
virtual void SetTextSizePixels(Int_t npixels)
Set the text size in pixel.
Definition TAttText.cxx:423
Font_t fTextFont
Text font.
Definition TAttText.h:27
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:373
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Definition TAttText.h:49
virtual Float_t GetTextSizePercent(Float_t size)
Return the text in percent of the pad size.
Definition TAttText.cxx:310
Short_t fTextAlign
Text alignment.
Definition TAttText.h:25
void Copy(TAttText &atttext) const
Copy this text attributes to a new TAttText.
Definition TAttText.cxx:294
virtual void ResetAttText(Option_t *toption="")
Reset this text attributes to default values.
Definition TAttText.cxx:361
Float_t fTextSize
Text size.
Definition TAttText.h:24