ROOT
6.30.04
Reference Guide
All
Namespaces
Files
Pages
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/RColor.hxx
>
14
15
namespace
ROOT {
16
namespace
Experimental {
17
18
/** \class RAttrLine
19
\ingroup GpadROOT7
20
\author Axel Naumann <axel@cern.ch>
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
26
class
RAttrLine :
public
RAttrBase {
27
28
RColor fColor{
this
,
"color_"
};
///<! line color, will access container from line attributes
29
30
R__ATTR_CLASS(RAttrLine,
"line_"
, AddDouble(
"width"
, 1.).AddInt(
"style"
, 1).AddDefaults(fColor));
31
32
// keep it here, it is minimal set of methods which should be reimplemented
33
// using RAttrBase::RAttrBase;
34
// RAttrLine(const RAttrLine &src) : RAttrLine() { src.CopyTo(*this); }
35
// RAttrLine &operator=(const RAttrLine &src) { Clear(); src.CopyTo(*this); return *this; }
36
37
///The width of the line.
38
RAttrLine &SetWidth(
double
width) { SetValue(
"width"
, width);
return
*
this
; }
39
double
GetWidth()
const
{
return
GetValue<double>(
"width"
); }
40
41
///The style of the line.
42
RAttrLine &SetStyle(
int
style) { SetValue(
"style"
, style);
return
*
this
; }
43
int
GetStyle()
const
{
return
GetValue<int>(
"style"
); }
44
45
///The color of the line.
46
RAttrLine &SetColor(
const
RColor &color) { fColor = color;
return
*
this
; }
47
const
RColor &GetColor()
const
{
return
fColor; }
48
RColor &Color() {
return
fColor; }
49
50
};
51
52
}
// namespace Experimental
53
}
// namespace ROOT
54
55
#endif
RAttrBase.hxx
RColor.hxx
graf2d
gpadv7
inc
ROOT
RAttrLine.hxx
Generated on Tue May 5 2020 14:02:32 for ROOT by
1.8.5