I'm experimenting with ROOT and I noticed something I don't understand.
The following piece of code creates a window divided in two pads, and a
line, drawn in both pads.
gROOT->Reset();
TCanvas window ("window","Window Title",100,100,300,300);
window.SetFillColor(4);
TLine line (0.07,0.07,0.43,0.93);
line.SetLineColor(12);
window.cd();
TPad widget1 ("widget1","Lower Part",0.05,0.05,0.95,0.45,6);
widget1.Draw();
widget1.cd();
line.Draw();
window.cd();
TPad widget2 ("widget2","Upper Part",0.05,0.55,0.95,0.95,6);
widget2.Draw();
widget2.cd();
line.Draw();
The strange thing is, if I right-click the line in the lower pad
and modify its attributes (say, change the color), the other view
of the line does _not_ change, even when I iconify and then restore
the window, thus enforcing a X11 repaint event.
Did I duplicate the line by drawing it in two pads? If yes, what if
I did this to a _named_ object?
Cheers, patrick
-- Patrick Schemitz, schemitz@ekp.physik.uni-karlsruhe.de University of Karlsruhe (TH), Germany Faculty for Physics, EKP, Ka'CDF Tracking Group