Re: TPolyLine3D::Draw() before and after saving

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue May 25 1999 - 13:21:06 MEST


Hi Valeri,
Following your previous report about TPolymarker3D, I already fixed
this problem in the development version. TPolyLine3D in 2.21/08 did not
restore correctly the member fLastPoint.

Rene Brun

Tioukov Valeri wrote:
> 
> Hi rooters,
> 
> In the following macro I create the TPolyLine3D  consisting from 2
> points. If I do l->Draw()  it draws "-" as expected.
> After saving to file and restoring it draws "L" instead where the 3-d
> point is 0,0,0.
> 
> Seems very strange, because l->Print() gives 2 points as well.
> 
> --------------------------------------l.C--------------------
> TCanvas sky( "sky", "???", 300, 10, 700, 500 );
> 
> void w()
> {
>    Float_t p[2][3] = {1,1,1,2,1,1};
>    TPolyLine3D *l = new TPolyLine3D(2,p);
>    TFile f("l.root","RECREATE");
>    l->Write("l");
>    f.Write();
>    f.Close();
>    TView  *v = new TView(1);
>    v->SetRange(0,0,0,3,3,3);
>    l->Draw();
> }
> 
> void r()
> {
>    TFile f("l.root");
>    l->Print();
>    TView   *v   = new TView(1);
>    v->SetRange(0,0,0,3,3,3);
>    l->Draw();
> 
>    Float_t *p = l->GetP();
>    for(int i=0; i< l->GetN(); i++)
>      printf("%d   %f %f %f\n", i,p[3*i+0],p[3*i+1],p[3*i+2]);
> }
> -------------------------------------------------------------------
> 
> Output is:
> 
> root [0] .L l.C
> root [1] w()
> root [2] r()
>     TPolyLine3D Printing N=2 Option=
> 0   1.000000 1.000000 1.000000
> 1   2.000000 1.000000 1.000000
> root [3]
> 
> Regards
> Valeri



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