Logo ROOT  
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 #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 
49 
50 #endif
51 
TAttLine::fLineColor
Color_t fLineColor
Line color.
Definition: TAttLine.h:21
kSolid
@ kSolid
Definition: TAttLine.h:48
Style_t
short Style_t
Definition: RtypesCore.h:80
Option_t
const char Option_t
Definition: RtypesCore.h:66
ELineStyle
ELineStyle
Definition: TAttLine.h:48
Float_t
float Float_t
Definition: RtypesCore.h:57
TAttLine::SetLineColorAlpha
virtual void SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
Set a transparent line color.
Definition: TAttLine.cxx:299
Int_t
int Int_t
Definition: RtypesCore.h:45
TAttLine::SaveLineAttributes
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:270
TAttLine::SetLineColor
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition: TAttLine.h:40
TAttLine::fLineWidth
Width_t fLineWidth
Line width.
Definition: TAttLine.h:23
Color_t
short Color_t
Definition: RtypesCore.h:83
TAttLine::Modify
virtual void Modify()
Change current line attributes if necessary.
Definition: TAttLine.cxx:242
TAttLine::SetLineAttributes
virtual void SetLineAttributes()
Invoke the DialogCanvas Line attributes.
Definition: TAttLine.cxx:290
TAttLine::Copy
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
Definition: TAttLine.cxx:172
kDashDotted
@ kDashDotted
Definition: TAttLine.h:48
TAttLine
Line Attributes class.
Definition: TAttLine.h:18
TAttLine::GetLineColor
virtual Color_t GetLineColor() const
Return the line color.
Definition: TAttLine.h:33
TAttLine::GetLineStyle
virtual Style_t GetLineStyle() const
Return the line style.
Definition: TAttLine.h:34
Width_t
short Width_t
Definition: RtypesCore.h:82
TAttLine::ResetAttLine
virtual void ResetAttLine(Option_t *option="")
Reset this line attributes to default values.
Definition: TAttLine.cxx:260
TAttLine::~TAttLine
virtual ~TAttLine()
AttLine destructor.
Definition: TAttLine.cxx:165
TAttLine::SetLineWidth
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:43
Double_t
double Double_t
Definition: RtypesCore.h:59
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TAttLine::TAttLine
TAttLine()
AttLine default constructor.
Definition: TAttLine.cxx:138
name
char name[80]
Definition: TGX11.cxx:110
kDashed
@ kDashed
Definition: TAttLine.h:48
TAttLine::DistancetoLine
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:206
TAttLine::GetLineWidth
virtual Width_t GetLineWidth() const
Return the line width.
Definition: TAttLine.h:35
TAttLine::fLineStyle
Style_t fLineStyle
Line style.
Definition: TAttLine.h:22
TAttLine::SetLineStyle
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition: TAttLine.h:42
Rtypes.h
kDotted
@ kDotted
Definition: TAttLine.h:48
int