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
13#include <ROOT/RAttrValue.hxx>
14
15namespace ROOT {
16namespace Experimental {
17
18/** \class RAttrLine
19\ingroup GpadROOT7
20\authors Axel Naumann <axel@cern.ch> Sergey Linev <s.linev@gsi.de>
21\date 2018-10-12
22\brief Drawing line 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
27
29
30public:
31
32 enum EStyle {
33 kNone = 0,
34 kSolid = 1,
47 kStyle10 = 10
48 };
49
50 RAttrValue<RColor> color{this, "color", RColor::kBlack}; ///<! line color
51 RAttrValue<double> width{this, "width", 1.}; ///<! line width
52 RAttrValue<EStyle> style{this, "style", kSolid}; ///<! line style
53 RAttrValue<std::string> pattern{this, "pattern"}; ///<! line pattern like "3,2,3,1,5"
54
55 RAttrLine(const RColor &_color, double _width, EStyle _style) : RAttrLine()
56 {
57 color = _color;
58 width = _width;
59 style = _style;
60 }
61
62};
63
64
65/** \class RAttrLineEnding
66\ingroup GpadROOT7
67\author Sergey Linev <s.linev@gsi.de>
68\date 2021-06-28
69\brief Attributes for line ending
70\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
71*/
72
74
76
77public:
78
79 RAttrValue<std::string> style{this, "style", ""}; ///<! axis ending style - none, arrow, circle
80 RAttrValue<RPadLength> size{this, "size", 0.02_normal}; ///<! ending size
81
82 void SetArrow() { style = "arrow"; }
83 void SetCircle() { style = "cicrle"; }
84};
85
86
87} // namespace Experimental
88} // namespace ROOT
89
90#endif
#define R__ATTR_CLASS(ClassName, dflt_prefix)
Base class for attributes aggregations like lines or fill attributes.
Attributes for line ending.
Definition RAttrLine.hxx:73
RAttrValue< std::string > style
! axis ending style - none, arrow, circle
Definition RAttrLine.hxx:79
RAttrValue< RPadLength > size
! ending size
Definition RAttrLine.hxx:80
Drawing line attributes for different objects.
Definition RAttrLine.hxx:26
RAttrLine(const RColor &_color, double _width, EStyle _style)
Definition RAttrLine.hxx:55
RAttrValue< RColor > color
! line color
Definition RAttrLine.hxx:50
RAttrValue< EStyle > style
! line style
Definition RAttrLine.hxx:52
RAttrValue< double > width
! line width
Definition RAttrLine.hxx:51
RAttrValue< std::string > pattern
! line pattern like "3,2,3,1,5"
Definition RAttrLine.hxx:53
Template class to access single value from drawable or other attributes.
The color class.
Definition RColor.hxx:33
static R__DLLEXPORT constexpr RGB_t kBlack
Definition RColor.hxx:178
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.