TPave Text (fwd)

From: Marek Idzik (idzik@to.infn.it)
Date: Mon Dec 13 1999 - 17:34:25 MET


Hi

I have simple problem ie to put a TPaveText with few lines of info
into my TCanvas, summarizing the plot created with TGraph.
I looked in the tutorials to get an example and then 
I included into my program a number of lines, the relevant ones are
below:

 TPaveText *opis;
 TText *t1;
 opis = new TPaveText(x1,y1,x2,y2);
 opis->SetFillColor(42);
 sprintf(tmp,"Peak energy %f",plot0[i].e_peak);
 t1 = opis->AddText(tmp);
 t1->SetTextSize(0.05);
 sprintf(tmp,"Gain %f",gain);
 opis->AddText(tmp);
 opis->Draw();   

Depending what I set as x1,x2,y1,y2 the program does things which
have nothing to do with my will(+segmentation fault and showing sometimes
partially the info I wanted)
Probably I set them in the wrong way but in the TPaveText class
description there is nothing said about and so I'm a bit confused.
Could sombody tell me how should I use TPaveText in order to get
a box with few lines in my TCanvas in a predictible way ?

marek



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:44 MET