Re: PAW's equivalent text x y [headstring] size

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Jan 05 1998 - 17:39:07 MET


Dirk Meier wrote:

> Hello,
>
> how do I translate the following PAW syntax to root?
>
> rn         = 523
> headstring = "Run Number: "//[rn]//" and other numbers"
> text 3 5 [headstring] 0.5
>
> e.g. TText expects a Text_t argument, so I would
> convert the number into a string (TString?) and
> concatenate...
> Is there an easy way to do this (also for floats).
>
> Dirk

  Use sprintf. Example
  char headstring[100];
  sprintf(headstring,"Run number %d",rn);
  TText *text = new TText(3,5,headstring);
   text->Draw();

Rene Brun



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