Hi Pasha, and thank you for your reply. What i have is a presentation page similar to the "Example of Object Oriented User Interface" of the ROOT Tutorials, with some buttons to access all the silicon histograms of CDF. I have to insert some pictures inside it, the gif picture of CDF for example. I joined the simplified file to this mail, but here is the very simple code of the page. I launchit by writing .L presentation.C+ at the ROOT prompt and then draw(); #include <iostream.h> #include <TButton.h> #include <TPavesText.h> #include <TFile.h> #include <TH1.h> #include <TH2.h> #include <TCanvas.h> void draw(); void draw() { TPavesText* pave = new TPavesText(0.1,.94,.85,0.99,5,"tr"); pave->SetFillColor(38); pave->AddText("Silicon"); pave->AddText("Display"); pave->Draw(); TButton* quit = new TButton("quit",".q",0.81,.95,0.84,0.98); quit->Draw(); TPavesText* fondtr = new TPavesText(0.09,0.05,.31,0.93,1,"tr"); TPavesText* pavetr = new TPavesText(0.1,.85,.3,0.92,3,"tr"); pavetr->SetFillColor(39); pavetr->AddText("Tracks"); fondtr->SetFillColor(39); fondtr->Draw(); pavetr->Draw(); TPavesText* foncl = new TPavesText(0.34,.05,.56,0.93,1,"tr"); TPavesText* pavecl = new TPavesText(0.35,.85,.55,0.92,3,"tr"); pavecl->SetFillColor(40); pavecl->AddText("Clusters"); foncl->SetFillColor(40); foncl->Draw(); pavecl->Draw(); TPavesText* fondr = new TPavesText(0.59,.05,.86,0.93,1,"tr"); TPavesText* paver = new TPavesText(0.6,.85,.85,0.92,3,"tr"); paver->SetFillColor(41); paver->AddText("Raw"); fondr->SetFillColor(41); fondr->Draw(); paver->Draw(); } On Tue, 1 May 2001, Pasha Murat (630)840-8237 FNAL (630)859-3463 home wrote: > Tourneur wrote: > > > > Dear Rooters, > > > > I'm beginning to try to use the GUI methods to insert pictures in a > > TCanvas from the ROOT prompt. All the examples i can read are given in > > compilation mode, but i don't manage to display pictures directly from > > the prompt or from a macro. Is there a simple way to do it? > > Thanks a lot for your help, > > hi Stephane, could you give an example of what you want to achieve - > otherwise it is not quite clear what are the pictures > which you're trying to display and where you want them to insert. > > -best, Pasha >
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:44 MET