Re: [ROOT] TPad won't Range().

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Sep 03 2001 - 06:40:56 MEST


Hi Brett,
Unfortunately, this is a problem for all objects like TPave that have to
work in User Coordinates or NDC. The fInit member in TPave is not reset
when the pad range is modified. There is no way to reset this protected
member. See TPave::ConvertPad..  for more details
I will have to find an acceptable solution.

Rene Brun


On Sat, 1 Sep 2001, Brett Viren wrote:

> Hi,
> 
> TPad::Range() doesn't seem to work when called a second time.  The
> script below shows this.  Do I do something wrong?
> 
>  {
>      TCanvas* c1 = new TCanvas("pad test","test a tpad",500,500);
>      c1->cd();
>      TPad* p1 = new TPad("pad1","pad1",0.1,0.1,0.9,0.9,2);
>      p1->Draw();
>      p1->cd();
>      TPave* pave1 = new TPave(0.1,0.1,0.9,0.9);
>      pave1->Draw();
> 
>      cout << "Set TPad's range to lower LHS\n";
>      p1->Range(0.0,0.0,0.5,0.5);
>      p1->Modified();
>      p1->Update();
> 
>      cout << "Now range back to center\n";
>      p1->Range(0.0,0.0,1.0,1.0);
>      p1->Modified();
>      p1->Update();
>  }
> 
> Using today's CVS on x86 Linux.
> -Brett.
> 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:59 MET