Re: [ROOT] TPaveText NDC Problems

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jul 03 2003 - 19:15:38 MEST


Hi Andreas,

When using the NDC coordinates, the system must be able to convert
between pad coordinates and NDC. For that, a pad must exist with the range
correctly set. This is automatically done when painting the pave object.
We assume that the user is not going to change his mind between the values
specified in the constructor and the first Draw call.

Rene Brun


Andreas Petzold wrote:
> 
> Hi Rooters,
> 
> I have a problem when changing the NDC coordinates of a TPaveText. I
> execute the following commands at the ROOT prompt:
> 
> root [0] TPaveText pave(.1,.1,.9,.9,"NDC");
> root [1] pave.AddText("Hello World");
> root [2] pave.SetX1NDC(0.5)
> root [3] pave.Draw()
> <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
> root [4] pave.SetX1NDC(0.5)
> root [5] pave.Draw()
> 
> The 1st time the TPaveText is drawn, the new X1NDC coordinate is ignored.
> After setting X1NDC again and drawing the TPaveText one more time, the new
> X1NDC is used. Is this the intended behaviour or am I doing something
> stupid here?
> 
> Thanks for your help
> 
>         Andreas
> 
> P.S: ROOT CVS snapshot 06/24/03 on RH7.2



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET