Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TAttLine.h
Go to the documentation of this file.
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 #include "Rtypes.h"
17 
18 class TAttLine {
19 
20 protected:
21  Color_t fLineColor; ///< Line color
22  Style_t fLineStyle; ///< Line style
23  Width_t fLineWidth; ///< Line width
24 
25 public:
26 
27  TAttLine();
28  TAttLine(Color_t lcolor,Style_t lstyle, Width_t lwidth);
29  virtual ~TAttLine();
30 
31  void Copy(TAttLine &attline) const;
32  Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2 );
33  virtual Color_t GetLineColor() const {return fLineColor;} ///< Return the line color
34  virtual Style_t GetLineStyle() const {return fLineStyle;} ///< Return the line style
35  virtual Width_t GetLineWidth() const {return fLineWidth;} ///< Return the line width
36  virtual void Modify();
37  virtual void ResetAttLine(Option_t *option="");
38  virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1);
39  virtual void SetLineAttributes(); // *MENU*
40  virtual void SetLineColor(Color_t lcolor) { fLineColor = lcolor;} ///< Set the line color
41  virtual void SetLineColorAlpha(Color_t lcolor, Float_t lalpha);
42  virtual void SetLineStyle(Style_t lstyle) { fLineStyle = lstyle;} ///< Set the line style
43  virtual void SetLineWidth(Width_t lwidth) { fLineWidth = lwidth;} ///< Set the line width
44 
45  ClassDef(TAttLine,2); //Line attributes
46 };
47 
48  enum ELineStyle { kSolid = 1, kDashed, kDotted, kDashDotted };
49 
50 #endif
51