Logo ROOT  
Reference Guide
RAttrMarker.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_RAttrMarker
10#define ROOT7_RAttrMarker
11
12#include <ROOT/RAttrBase.hxx>
13#include <ROOT/RColor.hxx>
14
15namespace ROOT {
16namespace Experimental {
17
18/** \class RAttrMarker
19\ingroup GpadROOT7
20\author Axel Naumann <axel@cern.ch>
21\date 2018-10-12
22\brief A marker attributes.
23\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
24*/
25
26class RAttrMarker : public RAttrBase {
27
28 RColor fColor{this, "color_"}; ///<! marker color, will access container from line attributes
29
30 R__ATTR_CLASS(RAttrMarker, "marker_", AddDouble("size", 1.).AddInt("style", 1).AddDefaults(fColor));
31
32 RAttrMarker &SetColor(const RColor &color) { fColor = color; return *this; }
33 const RColor &GetColor() const { return fColor; }
34 RColor &Color() { return fColor; }
35
36 /// The size of the marker.
37 RAttrMarker &SetSize(float size) { SetValue("size", size); return *this; }
38 float GetSize() const { return GetValue<double>("size"); }
39
40 /// The style of the marker.
41 RAttrMarker &SetStyle(int style) { SetValue("style", style); return *this; }
42 int GetStyle() const { return GetValue<int>("style"); }
43};
44
45} // namespace Experimental
46} // namespace ROOT
47
48#endif
Base class for all attributes, used with RDrawable.
Definition: RAttrBase.hxx:27
void SetValue(const std::string &name, bool value)
Definition: RAttrBase.cxx:101
RAttrMarker & SetSize(float size)
The size of the marker.
Definition: RAttrMarker.hxx:37
const RColor & GetColor() const
Definition: RAttrMarker.hxx:33
R__ATTR_CLASS(RAttrMarker, "marker_", AddDouble("size", 1.).AddInt("style", 1).AddDefaults(fColor))
RAttrMarker & SetColor(const RColor &color)
Definition: RAttrMarker.hxx:32
RAttrMarker & SetStyle(int style)
The style of the marker.
Definition: RAttrMarker.hxx:41
RColor fColor
! marker color, will access container from line attributes
Definition: RAttrMarker.hxx:28
The color class.
Definition: RColor.hxx:32
VSD Structures.
Definition: StringConv.hxx:21
TCanvas * style()
Definition: style.C:1