Logo ROOT  
Reference Guide
RAttrFill.hxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
3 * All rights reserved. *
4 * *
5 * For the licensing terms see $ROOTSYS/LICENSE. *
6 * For the list of contributors see $ROOTSYS/README/CREDITS. *
7 *************************************************************************/
8
9#ifndef ROOT7_RAttrFill
10#define ROOT7_RAttrFill
11
12#include <ROOT/RAttrBase.hxx>
13#include <ROOT/RColor.hxx>
14
15namespace ROOT {
16namespace Experimental {
17
18/** \class RAttrFill
19\ingroup GpadROOT7
20\author Sergey Linev
21\date 2019-09-13
22\brief Drawing fill attributes for different objects.
23\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
24*/
25
26class RAttrFill : public RAttrBase {
27
28 RColor fColor{this, "color_"}; ///<! line color, will access container from line attributes
29
30 R__ATTR_CLASS(RAttrFill, "fill_", AddInt("style", 1).AddDefaults(fColor));
31
32 ///The fill style
33 RAttrFill &SetStyle(int style) { SetValue("style", style); return *this; }
34 int GetStyle() const { return GetValue<int>("style"); }
35
36 ///The fill color
37 RAttrFill &SetColor(const RColor &color) { fColor = color; return *this; }
38 const RColor &GetColor() const { return fColor; }
39 RColor &Color() { return fColor; }
40
41};
42
43} // namespace Experimental
44} // namespace ROOT
45
46#endif
Base class for all attributes, used with RDrawable.
Definition: RAttrBase.hxx:27
void SetValue(const std::string &name, bool value)
Definition: RAttrBase.cxx:101
Drawing fill attributes for different objects.
Definition: RAttrFill.hxx:26
R__ATTR_CLASS(RAttrFill, "fill_", AddInt("style", 1).AddDefaults(fColor))
const RColor & GetColor() const
Definition: RAttrFill.hxx:38
RColor fColor
! line color, will access container from line attributes
Definition: RAttrFill.hxx:28
RAttrFill & SetStyle(int style)
The fill style.
Definition: RAttrFill.hxx:33
RAttrFill & SetColor(const RColor &color)
The fill color.
Definition: RAttrFill.hxx:37
The color class.
Definition: RColor.hxx:32
VSD Structures.
Definition: StringConv.hxx:21
TCanvas * style()
Definition: style.C:1