ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TMathText.h
Go to the documentation of this file.
1 // @(#)root/graf:$Id: TMathText.h 20882 2007-11-19 11:31:26Z rdm $
2 // Author: Yue Shi Lai 12/12/09
3 
4 /*************************************************************************
5  * Copyright (C) 2009, Yue Shi Lai. *
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 #ifndef ROOT_TMathText
12 #define ROOT_TMathText
13 
14 #ifndef ROOT_Riosfwd
15 #include "Riosfwd.h"
16 #endif
17 #ifndef ROOT_TText
18 #include "TText.h"
19 #endif
20 #ifndef ROOT_TAttFill
21 #include "TAttFill.h"
22 #endif
23 
24 class TMathTextRenderer;
25 
26 class TMathText : public TText, public TAttFill {
27 protected:
28  void *fRenderer; //!TMathText Painter
29  TMathText &operator=(const TMathText &);
30 
31  void Render(const Double_t x, const Double_t y,
32  const Double_t size, const Double_t angle,
33  const Char_t *t, const Int_t length);
34  void GetSize(Double_t &x0, Double_t &y0,
35  Double_t &x1, Double_t &y1,
36  const Double_t size, const Double_t angle,
37  const Char_t *t, const Int_t length);
38  void GetAlignPoint(Double_t &x0, Double_t &y0,
39  const Double_t size, const Double_t angle,
40  const Char_t *t, const Int_t length,
41  const Short_t align);
42 public:
43  enum {
44  kTextNDC = BIT(14)
45  };
46  TMathText(void);
47  TMathText(
48  Double_t x, Double_t y, const char *text);
49  TMathText(const TMathText &text);
50  virtual ~TMathText(void);
51  void Copy(TObject &text) const;
53  Double_t x, Double_t y, const char *text);
54  void GetBoundingBox(
55  UInt_t &w, UInt_t &h, Bool_t angle = kFALSE);
56  Double_t GetXsize(void);
57  Double_t GetYsize(void);
58  virtual void Paint(Option_t *option = "");
59  virtual void PaintMathText(
60  Double_t x, Double_t y, Double_t angle, Double_t size,
61  const char *text);
62  virtual void SavePrimitive(
63  std::ostream &out, Option_t *option = "");
64  friend class TMathTextRenderer;
65 
66  ClassDef(TMathText,2) //TeX mathematical formula
67 };
68 
69 #endif
virtual void PaintMathText(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text)
Paint text (used by Paint()).
Definition: TMathText.cxx:584
ClassDef(TAttBBox2D, 0)
const char Option_t
Definition: RtypesCore.h:62
#define BIT(n)
Definition: Rtypes.h:120
TH1 * h
Definition: legend2.C:5
void GetSize(Double_t &x0, Double_t &y0, Double_t &x1, Double_t &y1, const Double_t size, const Double_t angle, const Char_t *t, const Int_t length)
Get the text bounding box.
Definition: TMathText.cxx:417
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
void GetBoundingBox(UInt_t &w, UInt_t &h, Bool_t angle=kFALSE)
Get the text width and height.
Definition: TMathText.cxx:486
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TMathText.cxx:676
TMathText(void)
Fill Area Attributes class.
Definition: TAttFill.h:32
Double_t x[n]
Definition: legend1.C:17
void align()
Definition: geodemo.C:1778
void * fRenderer
Definition: TMathText.h:28
Base class for several text objects.
Definition: TText.h:42
char * out
Definition: TBase64.cxx:29
TMathText & operator=(const TMathText &)
TMathText Painter.
Definition: TMathText.cxx:380
TThread * t[5]
Definition: threadsh1.C:13
Double_t length(const TVector2 &v)
Definition: CsgOps.cxx:347
friend class TMathTextRenderer
Definition: TMathText.h:64
virtual ~TMathText(void)
Destructor.
Definition: TMathText.cxx:363
unsigned int UInt_t
Definition: RtypesCore.h:42
tuple w
Definition: qtexample.py:51
short Short_t
Definition: RtypesCore.h:35
static const double x1[5]
double Double_t
Definition: RtypesCore.h:55
TText * text
Double_t y[n]
Definition: legend1.C:17
void Copy(TObject &text) const
Copy.
Definition: TMathText.cxx:392
To draw TeX Mathematical Formula.
Definition: TMathText.h:26
Mother of all ROOT objects.
Definition: TObject.h:58
char Char_t
Definition: RtypesCore.h:29
void GetAlignPoint(Double_t &x0, Double_t &y0, const Double_t size, const Double_t angle, const Char_t *t, const Int_t length, const Short_t align)
Alignment.
Definition: TMathText.cxx:450
void Render(const Double_t x, const Double_t y, const Double_t size, const Double_t angle, const Char_t *t, const Int_t length)
Render the text.
Definition: TMathText.cxx:403
virtual void Paint(Option_t *option="")
Paint text.
Definition: TMathText.cxx:564
Double_t GetYsize(void)
Get Y size.
Definition: TMathText.cxx:527
Double_t GetXsize(void)
Get X size.
Definition: TMathText.cxx:506
TMathText * DrawMathText(Double_t x, Double_t y, const char *text)
Make a copy of this object with the new parameters and copy object attributes.
Definition: TMathText.cxx:549