Logo ROOT   6.08/07
Reference Guide
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 #ifndef ROOT_Rtypes
17 #include "Rtypes.h"
18 #endif
19 #ifndef ROOT_Riosfwd
20 #include "Riosfwd.h"
21 #endif
22 
23 
24 class TAttLine {
25 
26 protected:
27  Color_t fLineColor; ///< Line color
28  Style_t fLineStyle; ///< Line style
29  Width_t fLineWidth; ///< Line width
30 
31 public:
32 
33  TAttLine();
34  TAttLine(Color_t lcolor,Style_t lstyle, Width_t lwidth);
35  virtual ~TAttLine();
36 
37  void Copy(TAttLine &attline) const;
38  Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2 );
39  virtual Color_t GetLineColor() const {return fLineColor;} ///< Return the line color
40  virtual Style_t GetLineStyle() const {return fLineStyle;} ///< Return the line style
41  virtual Width_t GetLineWidth() const {return fLineWidth;} ///< Return the line width
42  virtual void Modify();
43  virtual void ResetAttLine(Option_t *option="");
44  virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1);
45  virtual void SetLineAttributes(); // *MENU*
46  virtual void SetLineColor(Color_t lcolor) { fLineColor = lcolor;} ///< Set the line color
47  virtual void SetLineColorAlpha(Color_t lcolor, Float_t lalpha);
48  virtual void SetLineStyle(Style_t lstyle) { fLineStyle = lstyle;} ///< Set the line style
49  virtual void SetLineWidth(Width_t lwidth) { fLineWidth = lwidth;} ///< Set the line width
50 
51  ClassDef(TAttLine,2); //Line attributes
52 };
53 
55 
56 #endif
57 
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:49
virtual void SetLineAttributes()
Invoke the DialogCanvas Line attributes.
Definition: TAttLine.cxx:280
short Style_t
Definition: RtypesCore.h:76
TAttLine()
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:41
ELineStyle
Definition: TAttLine.h:54
virtual Style_t GetLineStyle() const
Return the line style.
Definition: TAttLine.h:40
#define ClassDef(name, id)
Definition: Rtypes.h:254
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:46
Style_t fLineStyle
Line style.
Definition: TAttLine.h:28
Color_t fLineColor
Line color.
Definition: TAttLine.h:27
Width_t fLineWidth
Line width.
Definition: TAttLine.h:29
short Width_t
Definition: RtypesCore.h:78
virtual Color_t GetLineColor() const
Return the line color.
Definition: TAttLine.h:39
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:48
Line Attributes class.
Definition: TAttLine.h:24
char name[80]
Definition: TGX11.cxx:109