Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:30

0001 // @(#)root/base:$Id$
0002 // Author: Rene Brun   12/12/94
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TAttText
0013 #define ROOT_TAttText
0014 
0015 
0016 #include "Rtypes.h"
0017 
0018 class TAttText {
0019 
0020 protected:
0021    Float_t    fTextAngle;           ///< Text angle
0022    Float_t    fTextSize;            ///< Text size
0023    Short_t    fTextAlign;           ///< Text alignment
0024    Color_t    fTextColor;           ///< Text color
0025    Font_t     fTextFont;            ///< Text font
0026 
0027 public:
0028    TAttText();
0029    TAttText(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize);
0030    virtual ~TAttText();
0031            void     Copy(TAttText &atttext) const;
0032    virtual Short_t  GetTextAlign() const {return fTextAlign;} ///< Return the text alignment
0033    virtual Float_t  GetTextAngle() const {return fTextAngle;} ///< Return the text angle
0034    virtual Color_t  GetTextColor() const {return fTextColor;} ///< Return the text color
0035    virtual Font_t   GetTextFont()  const {return fTextFont;}  ///< Return the text font
0036    virtual Float_t  GetTextSize()  const {return fTextSize;}  ///< Return the text size
0037    virtual Float_t  GetTextSizePercent(Float_t size);         ///< Return the text in percent of the pad size
0038    virtual void     Modify();
0039    virtual void     ResetAttText(Option_t *toption="");
0040    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);
0041    virtual void     SetTextAttributes();  // *MENU*
0042    virtual void     SetTextAlign(Short_t align=11) { fTextAlign = align;}  ///< Set the text alignment
0043    virtual void     SetTextAngle(Float_t tangle=0) { fTextAngle = tangle;} ///< Set the text angle
0044    virtual void     SetTextColor(Color_t tcolor=1) { fTextColor = tcolor;} ///< Set the text color
0045    virtual void     SetTextColorAlpha(Color_t tcolor, Float_t talpha);
0046    virtual void     SetTextFont(Font_t tfont=62) { fTextFont = tfont;}     ///< Set the text font
0047    virtual void     SetTextSize(Float_t tsize=1) { fTextSize = tsize;}     ///< Set the text size
0048    virtual void     SetTextSizePixels(Int_t npixels);                      ///< Set the text size in pixel
0049 
0050    ClassDef(TAttText,2)  //Text attributes
0051 };
0052 
0053    enum ETextAlign {kHAlignLeft=10, kHAlignCenter=20, kHAlignRight=30,
0054                     kVAlignBottom=1, kVAlignCenter=2, kVAlignTop=3};
0055 
0056 #endif
0057