1    	// @(#)root/base:$Id$
2    	// Author: Rene Brun   28/11/94
3    	
4    	/*************************************************************************
5    	 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
6    	 * All rights reserved.                                                  *
7    	 *                                                                       *
8    	 * For the licensing terms see $ROOTSYS/LICENSE.                         *
9    	 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
10   	 *************************************************************************/
11   	
12   	#ifndef ROOT_TAttLine
13   	#define ROOT_TAttLine
14   	
15   	
16   	//////////////////////////////////////////////////////////////////////////
17   	//                                                                      //
18   	// TAttLine                                                             //
19   	//                                                                      //
20   	// Line attributes.                                                     //
21   	//                                                                      //
22   	//////////////////////////////////////////////////////////////////////////
23   	
24   	#ifndef ROOT_Rtypes
25   	#include "Rtypes.h"
26   	#endif
27   	#ifndef ROOT_Riosfwd
28   	#include "Riosfwd.h"
29   	#endif
30   	
31   	
32   	class TAttLine {
33   	
34   	protected:
35   	   Color_t    fLineColor;           //line color
36   	   Style_t    fLineStyle;           //line style
37   	   Width_t    fLineWidth;           //line width
38   	
39   	public:
40   	
41   	   TAttLine();
42   	   TAttLine(Color_t lcolor,Style_t lstyle, Width_t lwidth);
43   	   virtual ~TAttLine();
44   	
45   	   void             Copy(TAttLine &attline) const;
46   	   Int_t            DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2 );
47   	   virtual Color_t  GetLineColor() const {return fLineColor;}
48   	   virtual Style_t  GetLineStyle() const {return fLineStyle;}
49   	   virtual Width_t  GetLineWidth() const {return fLineWidth;}
50   	   virtual void     Modify();
51   	   virtual void     ResetAttLine(Option_t *option="");
52   	   virtual void     SaveLineAttributes(ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1);
53   	   virtual void     SetLineAttributes(); // *MENU*
54   	   virtual void     SetLineColor(Color_t lcolor) { fLineColor = lcolor;}
55   	   virtual void     SetLineColorAlpha(Color_t lcolor, Float_t lalpha);
56   	   virtual void     SetLineStyle(Style_t lstyle) { fLineStyle = lstyle;}
57   	   virtual void     SetLineWidth(Width_t lwidth) { fLineWidth = lwidth;}
58   	
59   	   ClassDef(TAttLine,2);  //Line attributes
60   	};
61   	
62   	   enum ELineStyle { kSolid = 1, kDashed, kDotted, kDashDotted };
63   	
64   	#endif
65   	
66