Logo ROOT  
Reference Guide
TAttFill.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Rene Brun 12/12/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_TAttFill
13 #define ROOT_TAttFill
14 
15 
16 #include "Rtypes.h"
17 
18 
19 class TAttFill {
20 
21 protected:
22  Color_t fFillColor; ///< Fill area color
23  Style_t fFillStyle; ///< Fill area style
24 
25 public:
26  TAttFill();
27  TAttFill(Color_t fcolor,Style_t fstyle);
28  virtual ~TAttFill();
29  void Copy(TAttFill &attfill) const;
30  virtual Color_t GetFillColor() const { return fFillColor; } ///< Return the fill area color
31  virtual Style_t GetFillStyle() const { return fFillStyle; } ///< Return the fill area style
32  virtual Bool_t IsTransparent() const;
33  virtual void Modify();
34  virtual void ResetAttFill(Option_t *option="");
35  virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001);
36  virtual void SetFillAttributes(); // *MENU*
37  virtual void SetFillColor(Color_t fcolor) { fFillColor = fcolor; } ///< Set the fill area color
38  virtual void SetFillColorAlpha(Color_t fcolor, Float_t falpha);
39  virtual void SetFillStyle(Style_t fstyle) { fFillStyle = fstyle; } ///< Set the fill area style
40 
41  ClassDef(TAttFill,2) //Fill area attributes
42 };
43 
45 { return fFillStyle >= 4000 && fFillStyle <= 4100 ? kTRUE : kFALSE; }
46 
47  enum EFillStyle {kFDotted1 = 3001, kFDotted2 = 3002, kFDotted3 = 3003,
48  kFHatched1 = 3004, kHatched2 = 3005, kFHatched3 = 3006,
49  kFHatched4 = 3007, kFWicker = 3008, kFScales = 3009,
50  kFBricks = 3010, kFSnowflakes = 3011, kFCircles = 3012,
51  kFTiles = 3013, kFMondrian = 3014, kFDiamonds = 3015,
52  kFWaves1 = 3016, kFDashed1 = 3017, kFDashed2 = 3018,
53  kFAlhambra = 3019, kFWaves2 = 3020, kFStars1 = 3021,
54  kFStars2 = 3022, kFPyramids = 3023, kFFrieze = 3024,
55  kFMetopes = 3025, kFEmpty = 0 , kFSolid = 1};
56 
57 #endif
kFDotted3
@ kFDotted3
Definition: TAttFill.h:47
kFFrieze
@ kFFrieze
Definition: TAttFill.h:54
kFDashed1
@ kFDashed1
Definition: TAttFill.h:52
kFSolid
@ kFSolid
Definition: TAttFill.h:55
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
Style_t
short Style_t
Definition: RtypesCore.h:80
kHatched2
@ kHatched2
Definition: TAttFill.h:48
kFDotted2
@ kFDotted2
Definition: TAttFill.h:47
kFHatched3
@ kFHatched3
Definition: TAttFill.h:48
TAttFill::Modify
virtual void Modify()
Change current fill area attributes if necessary.
Definition: TAttFill.cxx:211
kFStars2
@ kFStars2
Definition: TAttFill.h:54
kFBricks
@ kFBricks
Definition: TAttFill.h:50
kFHatched4
@ kFHatched4
Definition: TAttFill.h:49
kFWaves2
@ kFWaves2
Definition: TAttFill.h:53
SetFillStyle
a SetFillStyle(0)
kFPyramids
@ kFPyramids
Definition: TAttFill.h:54
kFWaves1
@ kFWaves1
Definition: TAttFill.h:52
kFStars1
@ kFStars1
Definition: TAttFill.h:53
Float_t
float Float_t
Definition: RtypesCore.h:57
Int_t
int Int_t
Definition: RtypesCore.h:45
TAttFill::fFillColor
Color_t fFillColor
Fill area color.
Definition: TAttFill.h:28
kFHatched1
@ kFHatched1
Definition: TAttFill.h:48
kFDashed2
@ kFDashed2
Definition: TAttFill.h:52
TAttFill::SaveFillAttributes
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
Definition: TAttFill.cxx:234
kFDotted1
@ kFDotted1
Definition: TAttFill.h:47
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
Color_t
short Color_t
Definition: RtypesCore.h:83
kFMetopes
@ kFMetopes
Definition: TAttFill.h:55
bool
kFWicker
@ kFWicker
Definition: TAttFill.h:49
kFScales
@ kFScales
Definition: TAttFill.h:49
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TAttFill::Copy
void Copy(TAttFill &attfill) const
Copy this fill attributes to a new TAttFill.
Definition: TAttFill.cxx:202
kFSnowflakes
@ kFSnowflakes
Definition: TAttFill.h:50
SetFillColor
h1 SetFillColor(kGreen)
TAttFill::SetFillAttributes
virtual void SetFillAttributes()
Invoke the DialogCanvas Fill attributes.
Definition: TAttFill.cxx:251
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
kFCircles
@ kFCircles
Definition: TAttFill.h:50
TAttFill::~TAttFill
virtual ~TAttFill()
AttFill destructor.
Definition: TAttFill.cxx:195
TAttFill::ResetAttFill
virtual void ResetAttFill(Option_t *option="")
Reset this fill attributes to default values.
Definition: TAttFill.cxx:225
kFTiles
@ kFTiles
Definition: TAttFill.h:51
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TAttFill::SetFillColorAlpha
virtual void SetFillColorAlpha(Color_t fcolor, Float_t falpha)
Set a transparent fill color.
Definition: TAttFill.cxx:260
name
char name[80]
Definition: TGX11.cxx:110
TAttFill::fFillStyle
Style_t fFillStyle
Fill area style.
Definition: TAttFill.h:29
kFEmpty
@ kFEmpty
Definition: TAttFill.h:55
EFillStyle
EFillStyle
Definition: TAttFill.h:47
TAttFill
Definition: TAttFill.h:19
kFAlhambra
@ kFAlhambra
Definition: TAttFill.h:53
Rtypes.h
kFDiamonds
@ kFDiamonds
Definition: TAttFill.h:51
TAttFill::IsTransparent
virtual Bool_t IsTransparent() const
Definition: TAttFill.h:44
kFMondrian
@ kFMondrian
Definition: TAttFill.h:51
TAttFill::TAttFill
TAttFill()
AttFill default constructor.
Definition: TAttFill.cxx:174