Hi,
You should do:
mbox->SetFillStyle(1001);
Cheers, Olivier Couet
On Fri, 15 Apr 2005, Tancredi Carli wrote:
>
> Hello,
>
> I have a problem to print-out a box with a color.
> The color appears on the screen, but not in the post-script file.
>
> I do the following:
> void test() {
>
> TCanvas * c1= new TCanvas();
>
>
> Double_t tsize=0.1, boxsize=0.1;
> Double_t y=0.8, x=0.3;
>
> Double_t y1=y-0.25*tsize;
> Double_t y2=y+0.25*tsize;
> Double_t x2=x-0.3*tsize;
> Double_t x1=x2-boxsize;
>
> printf("x1= %f x2= %f y1= %f y2= %f \n",x1,x2,y1,y2);
>
> TPave *mbox= new TPave(x1,y1,x2,y2,0,"NDC");
> //mbox->SetBit(TBox::kLineNDC ); // will set the bit kTRUE
> //mbox->SetBit(TBox::kLineNDC,kFALSE);
> //mbox.SetLineWidth(1);
> //mbox.SetLineColor(mcolor);
> //mbox.SetLineStyle(mstyle);
> //mbox->SetNDC();
>
> mbox->SetFillColor(kYellow);
> mbox->SetFillStyle(1);
> mbox->Draw();
>
> c1->Print("test.ps");
> }
>
>
> On the screen I see a yellow box, but not in the post-script file.
> how can I solve this problem ?
>
> I am using version /afs/cern.ch/sw/root/v4.02.00/rh73_gcc32/root/
>
> Thank you for your help.
>
> Tancredi
>
>
-- Org: CERN - European Laboratory for Particle Physics. Mail: 1211 Geneve 23 - Switzerland Mailbox: J25910 E-Mail: Olivier.Couet_at_cern.ch Phone: +41 22 7676522 WWW: http://cern.ch/Olivier.Couet/ Fax: +41 22 7670300Received on Fri Apr 15 2005 - 14:14:24 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:06 MET