Logo ROOT   6.10/09
Reference Guide
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Rene Brun 28/11/94
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  *************************************************************************/
12 #ifndef ROOT_TAttLine
13 #define ROOT_TAttLine
16 #include "Rtypes.h"
18 class TAttLine {
20 protected:
21  Color_t fLineColor; ///< Line color
22  Style_t fLineStyle; ///< Line style
23  Width_t fLineWidth; ///< Line width
25 public:
27  TAttLine();
28  TAttLine(Color_t lcolor,Style_t lstyle, Width_t lwidth);
29  virtual ~TAttLine();
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
45  ClassDef(TAttLine,2); //Line attributes
46 };
50 #endif
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:43
virtual void SetLineAttributes()
Invoke the DialogCanvas Line attributes.
Definition: TAttLine.cxx:280
short Style_t
Definition: RtypesCore.h:76
AttLine default constructor.
Definition: TAttLine.cxx:128
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
virtual void SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
Set a transparent line color.
Definition: TAttLine.cxx:289
int Int_t
Definition: RtypesCore.h:41
virtual void Modify()
Change current line attributes if necessary.
Definition: TAttLine.cxx:232
virtual Width_t GetLineWidth() const
Return the line width.
Definition: TAttLine.h:35
Definition: TAttLine.h:48
virtual Style_t GetLineStyle() const
Return the line style.
Definition: TAttLine.h:34
#define ClassDef(name, id)
Definition: Rtypes.h:297
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
Definition: TAttLine.cxx:162
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
Definition: TAttLine.cxx:260
virtual void ResetAttLine(Option_t *option="")
Reset this line attributes to default values.
Definition: TAttLine.cxx:250
short Color_t
Definition: RtypesCore.h:79
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition: TAttLine.h:40
Style_t fLineStyle
Line style.
Definition: TAttLine.h:22
Color_t fLineColor
Line color.
Definition: TAttLine.h:21
Width_t fLineWidth
Line width.
Definition: TAttLine.h:23
short Width_t
Definition: RtypesCore.h:78
virtual Color_t GetLineColor() const
Return the line color.
Definition: TAttLine.h:33
virtual ~TAttLine()
AttLine destructor.
Definition: TAttLine.cxx:155
double Double_t
Definition: RtypesCore.h:55
Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
Compute distance from point px,py to a line.
Definition: TAttLine.cxx:196
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition: TAttLine.h:42
Line Attributes class.
Definition: TAttLine.h:18