Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:22:25

0001 /*************************************************************************
0002  * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers.               *
0003  * All rights reserved.                                                  *
0004  *                                                                       *
0005  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0006  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0007  *************************************************************************/
0008 
0009 #ifndef ROOT7_RAttrLine
0010 #define ROOT7_RAttrLine
0011 
0012 #include <ROOT/RAttrAggregation.hxx>
0013 #include <ROOT/RAttrValue.hxx>
0014 
0015 namespace ROOT {
0016 namespace Experimental {
0017 
0018 /** \class RAttrLine
0019 \ingroup GpadROOT7
0020 \authors Axel Naumann <axel@cern.ch> Sergey Linev <s.linev@gsi.de>
0021 \date 2018-10-12
0022 \brief Drawing line attributes for different objects.
0023 \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
0024 */
0025 
0026 class RAttrLine : public RAttrAggregation {
0027 
0028    R__ATTR_CLASS(RAttrLine, "line");
0029 
0030 public:
0031 
0032    enum EStyle {
0033       kNone = 0,
0034       kSolid = 1,
0035       kDashed = 2,
0036       kDotted = 3,
0037       kDashDotted = 4,
0038       kStyle1 = 1,
0039       kStyle2 = 2,
0040       kStyle3 = 3,
0041       kStyle4 = 4,
0042       kStyle5 = 5,
0043       kStyle6 = 6,
0044       kStyle7 = 7,
0045       kStyle8 = 8,
0046       kStyle9 = 9,
0047       kStyle10 = 10
0048    };
0049 
0050    RAttrValue<RColor>  color{this, "color", RColor::kBlack}; ///<! line color
0051    RAttrValue<double>  width{this, "width", 1.};             ///<! line width
0052    RAttrValue<EStyle>  style{this, "style", kSolid};         ///<! line style
0053    RAttrValue<std::string> pattern{this, "pattern"};         ///<! line pattern like "3,2,3,1,5"
0054 
0055    RAttrLine(const RColor &_color, double _width, EStyle _style) : RAttrLine()
0056    {
0057       color = _color;
0058       width = _width;
0059       style = _style;
0060    }
0061 
0062 };
0063 
0064 
0065 /** \class RAttrLineEnding
0066 \ingroup GpadROOT7
0067 \author  Sergey Linev <s.linev@gsi.de>
0068 \date 2021-06-28
0069 \brief Attributes for line ending
0070 \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
0071 */
0072 
0073 class RAttrLineEnding : public RAttrAggregation {
0074 
0075    R__ATTR_CLASS(RAttrLineEnding, "ending");
0076 
0077 public:
0078 
0079    RAttrValue<std::string> style{this, "style", ""};       ///<! axis ending style - none, arrow, circle
0080    RAttrValue<RPadLength> size{this, "size", 0.02_normal}; ///<! ending size
0081 
0082    void SetArrow() { style = "arrow"; }
0083    void SetCircle() { style = "cicrle"; }
0084 };
0085 
0086 
0087 } // namespace Experimental
0088 } // namespace ROOT
0089 
0090 #endif