Hi Paul,
In your example below, you draw the box in fill area mode
on top of the line. Simply invert the Draw statements to be:
box->Draw();
line->Draw();
If you set a fill area for a box, the box frame is not drawn.
To understand the mechanism, play with mouse and the SetLineAttributes,
SetFillAttributes menu item for the line and box respectively.
Rene Brun
>
> {
>
> gROOT->Reset();
>
>
>
> c1 = new TCanvas("c1","An other canvas",100,10,700,700);
> c1->SetFillColor(18);
>
> Int_t nboxes=0;
>
> TBox *box;
> TLine *line;
> Double_t x1=0.1,y1=0.1,x2=0.5,y2=0.5;
>
> box = new TBox(x1,y1,x2,y2);
> line = new TLine(x1,y1,x2,y2);
>
> box->SetLineColor(7);
> box->SetLineWidth(20);
> box->SetFillColor(10);
> line->SetLineColor(8);
>
> line->Draw();
> box->Draw();
> c1->Update();
> return 0;
> }