Logo ROOT   6.18/05
Reference Guide
RAttrText.hxx
Go to the documentation of this file.
1/// \file ROOT/RAttrText.hxx
2/// \ingroup Gpad ROOT7
3/// \author Axel Naumann <axel@cern.ch>
4/// \date 2018-10-12
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#ifndef ROOT7_RAttrText
17#define ROOT7_RAttrText
18
19#include <ROOT/RDrawingAttr.hxx>
20#include <ROOT/RColor.hxx>
21
22#include <string>
23
24namespace ROOT {
25namespace Experimental {
26
27/** \class ROOT::Experimental::RText
28 A text.
29 */
30
32public:
33
35
36 /// The color of the text.
37 RAttrText &SetColor(const RColor &col) { Set("color", col); return *this; }
38 RColor GetColor() const { return Get<RColor>("color"); }
39
40 /// The size of the text.
41 RAttrText &SetSize(float size) { Set("size", size); return *this; }
42 float GetSize() const { return Get<float>("size"); }
43
44 /// The angle of the text.
45 RAttrText &SetAngle(float angle) { Set("angle", angle); return *this; }
46 float GetAngle() const { return Get<float>("angle"); }
47
48 /// The alignment of the text.
49 RAttrText &SetAlign(int style) { Set("align", style); return *this; }
50 int GetAlign() const { return Get<int>("align"); }
51
52 /// The font of the text.
53 RAttrText &SetFont(int font) { Set("font", font); return *this; }
54 int GetFont() const { return Get<int>("font"); }
55};
56
57} // namespace Experimental
58} // namespace ROOT
59
60#endif
RAttrText & SetAlign(int style)
The alignment of the text.
Definition: RAttrText.hxx:49
RAttrText & SetAngle(float angle)
The angle of the text.
Definition: RAttrText.hxx:45
RAttrText & SetSize(float size)
The size of the text.
Definition: RAttrText.hxx:41
RAttrText & SetColor(const RColor &col)
The color of the text.
Definition: RAttrText.hxx:37
RAttrText & SetFont(int font)
The font of the text.
Definition: RAttrText.hxx:53
A color: Red|Green|Blue|Alpha, or a position in a RPalette.
Definition: RColor.hxx:28
A collection of graphics attributes, for instance everything describing a line: color,...
RDrawingAttrBase()=default
Construct a default, unnamed, unconnected attribute.
void Set(const Name &name, const T &val)
Insert or update the attribute value identified by name to the given value.
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
TCanvas * style()
Definition: style.C:1