#ifndef ROOT_TLatex
#define ROOT_TLatex
#ifndef ROOT_Riosfwd
#include "Riosfwd.h"
#endif
#ifndef ROOT_TText
#include "TText.h"
#endif
#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif
struct FormSize_t {
      Double_t fWidth, fOver, fUnder;
};
struct TextSpec_t {
   Double_t fAngle,fSize;
   Int_t    fColor,fFont;
};
class TLatexFormSize {
private:
      Double_t fWidth, fOver, fUnder;
public:
      TLatexFormSize() : fWidth(0), fOver(0),fUnder(0) { } 
      TLatexFormSize(Double_t x, Double_t y1, Double_t y2) : fWidth(x), fOver(y1), fUnder(y2) { } 
      virtual ~TLatexFormSize() {} 
      TLatexFormSize(const TLatexFormSize& form) 
         : fWidth(form.fWidth), fOver(form.fOver), fUnder(form.fUnder) { }
      
      
      TLatexFormSize operator+(TLatexFormSize f)
         { return TLatexFormSize(f.Width()+fWidth,TMath::Max(f.Over(),fOver),TMath::Max(f.Under(),fUnder)); }
      void operator+=(TLatexFormSize f)
         { fWidth += f.Width(); fOver = TMath::Max(fOver,f.Over()); fUnder = TMath::Max(fUnder,f.Under()); }
      inline void Set(Double_t x, Double_t y1, Double_t y2) { fWidth=x; fOver=y1; fUnder=y2; }
      TLatexFormSize AddOver(TLatexFormSize f)
         { return TLatexFormSize(f.Width()+fWidth,f.Height()+fOver,fUnder); }
      TLatexFormSize AddUnder(TLatexFormSize f)
         { return TLatexFormSize(f.Width()+fWidth,fOver,f.Height()+fUnder); }
      TLatexFormSize AddOver(TLatexFormSize f1, TLatexFormSize f2)
         { return TLatexFormSize(fWidth+TMath::Max(f1.Width(),f2.Width()),fOver+f1.Over(),fUnder+f2.Under()); }
      
      inline Double_t Width()  const { return fWidth; }
      inline Double_t Over()   const { return fOver; }
      inline Double_t Under()  const { return fUnder; }
      inline Double_t Height() const { return fOver+fUnder; }
};
class TLatex : public TText, public TAttLine {
protected:
      Double_t      fFactorSize;      
      Double_t      fFactorPos;       
      Int_t         fLimitFactorSize; 
      const Char_t *fError;           
      Bool_t        fShow;            
      FormSize_t   *fTabSize;         
      Double_t      fOriginSize;      
      Int_t         fTabMax;          
      Int_t         fPos;             
      TLatex& operator=(const TLatex&); 
      
      TLatexFormSize Analyse(Double_t x, Double_t y, TextSpec_t spec, const Char_t* t,Int_t length);
      TLatexFormSize Anal1(TextSpec_t spec, const Char_t* t,Int_t length);
      void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, TextSpec_t spec);
      void DrawCircle(Double_t x1, Double_t y1, Double_t r, TextSpec_t spec);
      void DrawParenthesis(Double_t x1, Double_t y1, Double_t r1, Double_t r2, Double_t phimin, Double_t phimax, TextSpec_t spec);
      TLatexFormSize FirstParse(Double_t angle, Double_t size, const Char_t *text);
      void Savefs(TLatexFormSize *fs);
      TLatexFormSize Readfs();
      Int_t CheckLatexSyntax(TString &text) ;
public:
      
      enum { kTextNDC = BIT(14) };
      TLatex();
      TLatex(Double_t x, Double_t y, const char *text);
      TLatex(const TLatex &text);
      virtual ~TLatex();
      void             Copy(TObject &text) const;
      TLatex          *DrawLatex(Double_t x, Double_t y, const char *text);
      Double_t         GetHeight() const;
      Double_t         GetXsize();
      Double_t         GetYsize();
      void             GetBoundingBox(UInt_t &w, UInt_t &h, Bool_t angle = kFALSE);
      virtual void     Paint(Option_t *option="");
      virtual void     PaintLatex(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text);
      virtual void     SavePrimitive(ostream &out, Option_t *option = "");
      virtual void     SetIndiceSize(Double_t factorSize);
      virtual void     SetLimitIndiceSize(Int_t limitFactorSize);
      ClassDef(TLatex,2)  
};
#endif
Last change: Mon Dec  1 17:07:10 2008
Last generated: 2008-12-01 17:07
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.