Hi Dmitri, Your suggestion could be quite complex to implement. It would imply a parallel table of attributes for Postscript and there are many possible attributes and combinations. I suggest something simpler and more general like the macro below (it could become a member function of TPad/TCanvas). With this macro printps.C, doing .x printps.C("myStyle") will draw a copy of the current canvas using the style "myStyle"). The style can be one of the predefined styles such as "Default", "Plain", "Bold", etc void printps(const char *styleName="Plain") { // A clone of the current canvas is created, its style changed // to the specified style, printed, then deleted TStyle *currentStyle = gStyle; gROOT->SetStyle(styleName); TCanvas *canvas = gPad->GetCanvas(); TCanvas *temp = (TCanvas*)canvas->Clone(); temp->UseCurrentStyle(); temp->Draw(); temp->Print(); currentStyle->cd(); delete temp; } As usual, comments are welcome. Rene Brun Dmitri Litvintsev wrote: > > Dear Rooters, > > ROOT base dapplications have been put to the test during > commissioning run of CDF detector. > > I've got one request regarding printing the pictures. > Is it possible for all drawables to have something like > fFillColorPS, fLineColorPS, fTextColorPS which by default > would be equal to fFillColor, fLineColor, fTextColor but > may be modified such that the picture on the screen is > different from the picture produced by the printer. For example > in the screen, the TPad is nice (sometimes) to have filled black, > while on the hardcopy one wants to have background white. Analogously > for white lines on black background, one wants to have black > lines on white background. > Using that kind of manipulations one can tune one's application > to produce different ouput for different purposes, like > on color printer, BW printer etc... > > Dmitri Litvintsev > > /----------------------------------------------------------\ > | Tel: (630) 840 5005 | > | FAX: (630) 840 2968 | > | office: 169-E CDF Trailers | > | E-mail: litvinse@fnal.gov | > \----------------------------------------------------------/
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:36 MET