Draw a pave text.
The text lines are added in order using the AddText method Line separator can be added using AddLine.
AddText returns a TText corresponding to the line added to the pave. This return value can be used to modify the text attributes.
Once the TPaveText is build the text of each line can be retrieved as a TText with GetLine and GetLineWith wich is also useful to modify the text attributes of a line.
pt->
AddText(
"A TPaveText can contain severals line of text.");
pt->
AddText(
"They are added to the pave using the AddText method.");
pt->
AddText(
"Even complex TLatex formulas can be added:");
TText *
t1 =
pt->
AddText(
"F(t) = #sum_{i=-#infty}^{#infty}A(i)cos#[]{#frac{i}{t+i}}");
}
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
virtual TLine * AddLine(Double_t x1=0, Double_t y1=0, Double_t x2=0, Double_t y2=0)
Add a new graphics line to this pavetext.
virtual TText * GetLineWith(const char *text) const
Get Pointer to first containing string text in this pavetext.
Base class for several text objects.
- Author
- Olivier Couet
Definition in file pavetext.C.