Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RLine.hxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2021, 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_RLine
10#define ROOT7_RLine
11
13#include <ROOT/RAttrLine.hxx>
14#include <ROOT/RPadPos.hxx>
15
16#include <initializer_list>
17
18namespace ROOT {
19namespace Experimental {
20
21/** \class RLine
22\ingroup GrafROOT7
23\brief A simple line.
24\authors Olivier Couet <Olivier.Couet@cern.ch>, Sergey Linev <S.Linev@gsi.de>
25\date 2017-10-16
26\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
27*/
28
29class RLine : public ROnFrameDrawable {
30
31 RPadPos fP1, fP2; ///< line begin/end
32public:
33 RAttrLine line{this, "line"}; ///<! line attributes
34
35 RLine() : ROnFrameDrawable("line") {}
36
37 RLine(const RPadPos &p1, const RPadPos &p2) : RLine()
38 {
39 fP1 = p1;
40 fP2 = p2;
41 }
42
43 RLine &SetP1(const RPadPos &p1)
44 {
45 fP1 = p1;
46 return *this;
47 }
48
49 RLine &SetP2(const RPadPos &p2)
50 {
51 fP2 = p2;
52 return *this;
53 }
54
55 const RPadPos &GetP1() const { return fP1; }
56 const RPadPos &GetP2() const { return fP2; }
57};
58
59} // namespace Experimental
60} // namespace ROOT
61
62#endif
Drawing line attributes for different objects.
Definition RAttrLine.hxx:26
RLine & SetP1(const RPadPos &p1)
Definition RLine.hxx:43
RLine(const RPadPos &p1, const RPadPos &p2)
Definition RLine.hxx:37
RAttrLine line
! line attributes
Definition RLine.hxx:33
RLine & SetP2(const RPadPos &p2)
Definition RLine.hxx:49
const RPadPos & GetP2() const
Definition RLine.hxx:56
RPadPos fP2
line begin/end
Definition RLine.hxx:31
const RPadPos & GetP1() const
Definition RLine.hxx:55
ROnFrameDrawable(const ROnFrameDrawable &)=delete
A position (horizontal and vertical) in a RPad.
Definition RPadPos.hxx:28
Namespace for ROOT features in testing.
Definition TROOT.h:100
Small utility to parse cmdline options.
Definition RExports.h:71