Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
44 inline Bool_t TAttFill::IsTransparent() const
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