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 TColorNumber;
19class TVirtualPad;
20
21class TAttLine {
22
23protected:
24 Color_t fLineColor; ///< Line color
25 Style_t fLineStyle; ///< Line style
26 Width_t fLineWidth; ///< Line width
27
28public:
29
30 TAttLine();
32 virtual ~TAttLine();
33
34 void Copy(TAttLine &attline) const;
36 virtual Color_t GetLineColor() const {return fLineColor;} ///< Return the line color
37 virtual Style_t GetLineStyle() const {return fLineStyle;} ///< Return the line style
38 virtual Width_t GetLineWidth() const {return fLineWidth;} ///< Return the line width
39 virtual void Modify();
40 virtual void ModifyOn(TVirtualPad &pad);
41 virtual void ResetAttLine(Option_t *option="");
42 virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1);
43 virtual void SetLineAttributes(); // *MENU*
44 virtual void SetLineColor(Color_t lcolor) { fLineColor = lcolor;} ///< Set the line color
46 virtual void SetLineStyle(Style_t lstyle) { fLineStyle = lstyle;} ///< Set the line style
47 virtual void SetLineWidth(Width_t lwidth) { fLineWidth = lwidth;} ///< Set the line width
48
50
51 ClassDef(TAttLine,2); //Line attributes
52};
53
55
56#endif
57
short Style_t
Style number (short)
Definition RtypesCore.h:96
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
short Color_t
Color number (short)
Definition RtypesCore.h:99
short Width_t
Line width (short)
Definition RtypesCore.h:98
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
#define ClassDef(name, id)
Definition Rtypes.h:344
ELineStyle
Definition TAttLine.h:54
@ kDashed
Definition TAttLine.h:54
@ kSolid
Definition TAttLine.h:54
@ kDashDotted
Definition TAttLine.h:54
@ kDotted
Definition TAttLine.h:54
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t option
Option_t ResetAttLine
Option_t Option_t SetLineColor
char name[80]
Definition TGX11.cxx:157
Line Attributes class.
Definition TAttLine.h:21
virtual Color_t GetLineColor() const
Return the line color.
Definition TAttLine.h:36
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition TAttLine.h:46
virtual Width_t GetLineWidth() const
Return the line width.
Definition TAttLine.h:38
virtual void SetLineAttributes()
Invoke the DialogCanvas Line attributes.
Definition TAttLine.cxx:306
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:47
virtual void SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
Set a transparent line color.
Definition TAttLine.cxx:317
Width_t fLineWidth
Line width.
Definition TAttLine.h:26
virtual void ModifyOn(TVirtualPad &pad)
Change current line attributes on specified pad.
Definition TAttLine.cxx:255
virtual ~TAttLine()
AttLine destructor.
Definition TAttLine.cxx:169
TAttLine()
AttLine default constructor.
Definition TAttLine.cxx:142
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition TAttLine.h:44
virtual Style_t GetLineStyle() const
Return the line style.
Definition TAttLine.h:37
virtual void Modify()
Change current line attributes if necessary.
Definition TAttLine.cxx:246
Style_t fLineStyle
Line style.
Definition TAttLine.h:25
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
Definition TAttLine.cxx:176
Color_t fLineColor
Line color.
Definition TAttLine.h:24
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:210
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:289
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51