Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RAttrLine.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_RAttrLine
10#define ROOT7_RAttrLine
11
12#include <ROOT/RAttrBase.hxx>
13#include <ROOT/RAttrColor.hxx>
14#include <ROOT/RAttrValue.hxx>
15
16namespace ROOT {
17namespace Experimental {
18
19/** \class RAttrLine
20\ingroup GpadROOT7
21\author Axel Naumann <axel@cern.ch>
22\date 2018-10-12
23\brief Drawing line attributes for different objects.
24\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
25*/
26
27class RAttrLine : public RAttrBase {
28
29 RAttrColor fColor{this, "color"}; ///<! line color
30 RAttrValue<double> fWidth{this, "width", 1.}; ///<! line width
31 RAttrValue<int> fStyle{this, "style", 1}; ///<! line style
32
34
35 ///The width of the line.
36 RAttrLine &SetWidth(double width) { fWidth = width; return *this; }
37 double GetWidth() const { return fWidth; }
38
39 ///The style of the line.
40 RAttrLine &SetStyle(int style) { fStyle = style; return *this; }
41 int GetStyle() const { return fStyle; }
42
43 ///The color of the line.
44 RAttrLine &SetColor(const RColor &color) { fColor = color; return *this; }
45 RColor GetColor() const { return fColor.GetColor(); }
47
48};
49
50} // namespace Experimental
51} // namespace ROOT
52
53#endif
include TDocParser_001 C image html pict1_TDocParser_001 png width
Base class for all attributes, used with RDrawable.
Definition RAttrBase.hxx:31
Access RColor from drawable attributes.
RColor GetColor() const
Extract RColor for given attribute.
Drawing line attributes for different objects.
Definition RAttrLine.hxx:27
RAttrValue< int > fStyle
! line style
Definition RAttrLine.hxx:31
RAttrLine & SetColor(const RColor &color)
The color of the line.
Definition RAttrLine.hxx:44
RAttrColor fColor
! line color
Definition RAttrLine.hxx:29
RAttrLine & SetWidth(double width)
The width of the line.
Definition RAttrLine.hxx:36
R__ATTR_CLASS(RAttrLine, "line")
RAttrValue< double > fWidth
! line width
Definition RAttrLine.hxx:30
RAttrLine & SetStyle(int style)
The style of the line.
Definition RAttrLine.hxx:40
Template class to access single value from drawable or other attributes.
The color class.
Definition RColor.hxx:35
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
TCanvas * style()
Definition style.C:1