Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
18class TAttLine {
19
20protected:
21 Color_t fLineColor; ///< Line color
22 Style_t fLineStyle; ///< Line style
23 Width_t fLineWidth; ///< Line width
24
25public:
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
short Style_t
Definition RtypesCore.h:89
int Int_t
Definition RtypesCore.h:45
short Color_t
Definition RtypesCore.h:92
short Width_t
Definition RtypesCore.h:91
float Float_t
Definition RtypesCore.h:57
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:337
ELineStyle
Definition TAttLine.h:48
@ kDashed
Definition TAttLine.h:48
@ kSolid
Definition TAttLine.h:48
@ kDashDotted
Definition TAttLine.h:48
@ kDotted
Definition TAttLine.h:48
Option_t Option_t option
Option_t ResetAttLine
char name[80]
Definition TGX11.cxx:110
Line Attributes class.
Definition TAttLine.h:18
virtual Color_t GetLineColor() const
Return the line color.
Definition TAttLine.h:33
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition TAttLine.h:42
virtual Width_t GetLineWidth() const
Return the line width.
Definition TAttLine.h:35
virtual void SetLineAttributes()
Invoke the DialogCanvas Line attributes.
Definition TAttLine.cxx:292
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:43
virtual void SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
Set a transparent line color.
Definition TAttLine.cxx:301
Width_t fLineWidth
Line width.
Definition TAttLine.h:23
virtual ~TAttLine()
AttLine destructor.
Definition TAttLine.cxx:168
TAttLine()
AttLine default constructor.
Definition TAttLine.cxx:141
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition TAttLine.h:40
virtual Style_t GetLineStyle() const
Return the line style.
Definition TAttLine.h:34
virtual void Modify()
Change current line attributes if necessary.
Definition TAttLine.cxx:245
Style_t fLineStyle
Line style.
Definition TAttLine.h:22
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
Definition TAttLine.cxx:175
Color_t fLineColor
Line color.
Definition TAttLine.h:21
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:209
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:273