An example,
TCanvas *tCanvas = new TCanvas("tCanvas");
tCanvas->Range(-8.75,-5.83334,8.75,5.83334);
TPolyLine *pline = new TPolyLine(5);
pline->SetFillColor(38);
pline->SetLineColor(2);
pline->SetLineWidth(4);
pline->SetPoint(0,-5.57886,0.125448);
pline->SetPoint(1,3.4354,-4.39068);
pline->SetPoint(2,1.46812,4.89248);
pline->SetPoint(3,-5.57886,3.23029);
pline->SetPoint(4,-5.57886,0.125448);
pline->Draw("f");
pline->Draw();
}
Rene Brun
On Tue, 5 Nov 2002, Datao Gong wrote:
> Yes. It works. But another question, if i want to draw borden
> line and fill with another color, how should i do? i found
> that the borden lines are covered by filled color.
>
>
> Gong Datao
>
>
> On Tue, 5 Nov 2002, Rene Brun wrote:
>
> > Draw your polyline with option "f" in addition to SetFillColor.
> >
> > Rene Brun
> >
> > On Mon, 4 Nov 2002, Datao Gong wrote:
> >
> > > Hi,
> > > Although PolyLine inherit from TAttFill. But SetFillColor seems does not
> > > work. Although these ploylines are closed, how to fill them?
> > > Thanks.
> > >
> > > Datao Gong
> > >
> > >
> >
>
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:16 MET