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 ////////////////////////////////////////////////////////////////////////// 17 // // 18 // TAttFill // 19 // // 20 // Fill area attributes. // 21 // // 22 ////////////////////////////////////////////////////////////////////////// 23 24 #ifndef ROOT_Rtypes 25 #include "Rtypes.h" 26 #endif 27 #ifndef ROOT_Riosfwd 28 #include "Riosfwd.h" 29 #endif 30 31 32 class TAttFill { 33 34 protected: 35 Color_t fFillColor; //fill area color 36 Style_t fFillStyle; //fill area style 37 38 public: 39 TAttFill(); 40 TAttFill(Color_t fcolor,Style_t fstyle); 41 virtual ~TAttFill(); 42 void Copy(TAttFill &attfill) const; 43 virtual Color_t GetFillColor() const { return fFillColor; } 44 virtual Style_t GetFillStyle() const { return fFillStyle; } 45 virtual Bool_t IsTransparent() const; 46 virtual void Modify(); 47 virtual void ResetAttFill(Option_t *option=""); 48 virtual void SaveFillAttributes(ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001); 49 virtual void SetFillAttributes(); // *MENU* 50 virtual void SetFillColor(Color_t fcolor) { fFillColor = fcolor; } 51 virtual void SetFillColorAlpha(Color_t fcolor, Float_t falpha); 52 virtual void SetFillStyle(Style_t fstyle) { fFillStyle = fstyle; } 53 54 ClassDef(TAttFill,2) //Fill area attributes 55 }; 56 57 inline Bool_t TAttFill::IsTransparent() const 58 { return fFillStyle >= 4000 && fFillStyle <= 4100 ? kTRUE : kFALSE; } 59 60 enum EFillStyle {kFDotted1 = 3001, kFDotted2 = 3002, kFDotted3 = 3003, 61 kFHatched1 = 3004, kHatched2 = 3005, kFHatched3 = 3006, 62 kFHatched4 = 3007, kFWicker = 3008, kFScales = 3009, 63 kFBricks = 3010, kFSnowflakes = 3011, kFCircles = 3012, 64 kFTiles = 3013, kFMondrian = 3014, kFDiamonds = 3015, 65 kFWaves1 = 3016, kFDashed1 = 3017, kFDashed2 = 3018, 66 kFAlhambra = 3019, kFWaves2 = 3020, kFStars1 = 3021, 67 kFStars2 = 3022, kFPyramids = 3023, kFFrieze = 3024, 68 kFMetopes = 3025, kFEmpty = 0 , kFSolid = 1}; 69 70 #endif 71