Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
18class TColorNumber;
19class TVirtualPad;
20
21class TAttFill {
22
23protected:
24 Color_t fFillColor; ///< Fill area color
25 Style_t fFillStyle; ///< Fill area style
26
27public:
28 TAttFill();
30 virtual ~TAttFill();
31 void Copy(TAttFill &attfill) const;
32 virtual Color_t GetFillColor() const { return fFillColor; } ///< Return the fill area color
33 virtual Style_t GetFillStyle() const { return fFillStyle; } ///< Return the fill area style
34 virtual Bool_t IsTransparent() const;
35 virtual void ModifyOn(TVirtualPad &pad);
36 virtual void Modify();
37 virtual void ResetAttFill(Option_t *option="");
38 virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001);
39 virtual void SetFillAttributes(); // *MENU*
40 virtual void SetFillColor(Color_t fcolor) { fFillColor = fcolor; } ///< Set the fill area color
41 virtual void SetFillColorAlpha(Color_t fcolor, Float_t falpha);
42 virtual void SetFillStyle(Style_t fstyle) { fFillStyle = fstyle; } ///< Set the fill area style
43
45
46 ClassDef(TAttFill,2) //Fill area attributes
47};
48
50{ return fFillStyle >= 4000 && fFillStyle <= 4100 ? kTRUE : kFALSE; }
51
52 enum EFillStyle {kFDotted1 = 3001, kFDotted2 = 3002, kFDotted3 = 3003,
53 kFHatched1 = 3004, kHatched2 = 3005, kFHatched3 = 3006,
54 kFHatched4 = 3007, kFWicker = 3008, kFScales = 3009,
55 kFBricks = 3010, kFSnowflakes = 3011, kFCircles = 3012,
56 kFTiles = 3013, kFMondrian = 3014, kFDiamonds = 3015,
57 kFWaves1 = 3016, kFDashed1 = 3017, kFDashed2 = 3018,
58 kFAlhambra = 3019, kFWaves2 = 3020, kFStars1 = 3021,
59 kFStars2 = 3022, kFPyramids = 3023, kFFrieze = 3024,
60 kFMetopes = 3025, kFEmpty = 0 , kFSolid = 1};
61
62#endif
short Style_t
Style number (short)
Definition RtypesCore.h:96
bool Bool_t
Boolean (0=false, 1=true) (bool)
Definition RtypesCore.h:77
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
short Color_t
Color number (short)
Definition RtypesCore.h:99
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
#define ClassDef(name, id)
Definition Rtypes.h:344
EFillStyle
Definition TAttFill.h:52
@ kFAlhambra
Definition TAttFill.h:58
@ kFDotted3
Definition TAttFill.h:52
@ kFMetopes
Definition TAttFill.h:60
@ kFWicker
Definition TAttFill.h:54
@ kFSolid
Definition TAttFill.h:60
@ kFDashed1
Definition TAttFill.h:57
@ kFDiamonds
Definition TAttFill.h:56
@ kFDashed2
Definition TAttFill.h:57
@ kFTiles
Definition TAttFill.h:56
@ kFBricks
Definition TAttFill.h:55
@ kFStars1
Definition TAttFill.h:58
@ kFPyramids
Definition TAttFill.h:59
@ kFWaves1
Definition TAttFill.h:57
@ kHatched2
Definition TAttFill.h:53
@ kFCircles
Definition TAttFill.h:55
@ kFDotted2
Definition TAttFill.h:52
@ kFHatched3
Definition TAttFill.h:53
@ kFDotted1
Definition TAttFill.h:52
@ kFFrieze
Definition TAttFill.h:59
@ kFHatched4
Definition TAttFill.h:54
@ kFSnowflakes
Definition TAttFill.h:55
@ kFScales
Definition TAttFill.h:54
@ kFEmpty
Definition TAttFill.h:60
@ kFMondrian
Definition TAttFill.h:56
@ kFWaves2
Definition TAttFill.h:58
@ kFHatched1
Definition TAttFill.h:53
@ kFStars2
Definition TAttFill.h:59
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 Option_t SetFillColor
char name[80]
Definition TGX11.cxx:157
Fill Area Attributes class.
Definition TAttFill.h:21
virtual Color_t GetFillColor() const
Return the fill area color.
Definition TAttFill.h:32
void Copy(TAttFill &attfill) const
Copy this fill attributes to a new TAttFill.
Definition TAttFill.cxx:206
virtual Style_t GetFillStyle() const
Return the fill area style.
Definition TAttFill.h:33
virtual void Modify()
Change current fill area attributes if necessary.
Definition TAttFill.cxx:215
Style_t fFillStyle
Fill area style.
Definition TAttFill.h:25
virtual ~TAttFill()
AttFill destructor.
Definition TAttFill.cxx:199
Color_t fFillColor
Fill area color.
Definition TAttFill.h:24
TAttFill()
AttFill default constructor.
Definition TAttFill.cxx:178
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition TAttFill.h:40
virtual void SetFillColorAlpha(Color_t fcolor, Float_t falpha)
Set a transparent fill color.
Definition TAttFill.cxx:265
virtual void SetFillAttributes()
Invoke the DialogCanvas Fill attributes.
Definition TAttFill.cxx:254
virtual void ResetAttFill(Option_t *option="")
Reset this fill attributes to default values.
Definition TAttFill.cxx:234
virtual Bool_t IsTransparent() const
Definition TAttFill.h:49
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition TAttFill.h:42
virtual void ModifyOn(TVirtualPad &pad)
Change current fill area attributes on speicifed pad.
Definition TAttFill.cxx:224
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:243
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51