Hi Zaldy, Thanks for reporting this problem. It is fixed now - take the latest cvs repository. Best regards, Ilka zaldy wrote: > Dear All, > > How do we save a pad with objects in it that is created from > TRootEmbeddedCanvas? > > For example the below lines come from pages 311-312 of Root Manual > Ver3.05. When I save it with file extension .ps or .C, the errors below > occur. Is saving mechanism of TRootEmbeddedCanvas different even if we use > a pointer from TCanvas, fCanvas->SaveAs(prn_name) ? > > How to save then? > > Thank you. > zaldy nawang > > //------------------- > Warning in > <TCanvas::ResizePad>: Ecanvs width changed from 32000 to 10 > > Warning in <TCanvas::ResizePad>: Ecanvs height changed from 32000 to 10 > > root [1] Warning in <TCanvas::ResizePad>: Ecanvs width changed from 32000 > to 10 > > Warning in <TCanvas::ResizePad>: Ecanvs height changed from 32000 to 10 > > Error in <RootX11ErrorHandler>: BadAlloc (insufficient resources for > operation) (XID: 20971652, XREQ: 53) > //-------------------- > > void MyMainFrame::DoDraw() > { > TCanvas * fCanvas = fEcanvas->GetCanvas(); > fCanvas->cd(); > char t[10]; > char prn_name[20]; > TText * txt = new TText(); > txt->SetTextSize(1.); > txt->SetTextColor(2); > txt->SetTextAlign(22); > > for(int i=0; i<100; i++) { > sprintf(t,"%d",i); > txt->DrawText(0.5,0.5,t); > fCanvas->Update(); > sprintf(prn_name,"%d.C",i); > fCanvas->SaveAs(prn_name); > gSystem->Sleep(1000); > fCanvas->Clear(); > } > } > > -- > > -------------------------------------------------------- > Zaldy A. Nawang > PS Users Room 2 > Yon Gokan, > E362, Neutrino Group, > IPNS, KEK, > Japan > > e-mail: zaldy@neutrino.kek.jp > Tel. No. : (81) 029864 - 5387 > --------------------------------------------------------
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET