25#include "ROOT/RPaveText.hxx"
26#include "ROOT/RFont.hxx"
33 auto canvas = RCanvas::Create(
"RPave example");
36 auto pave = canvas->Draw<
RPave>();
38 pave->fill.style = RAttrFill::k3001;
39 pave->border.color = RColor::kGreen;
40 pave->border.width = 3;
41 pave->corner = RPave::kTopLeft;
42 pave->offsetX = pave->offsetY = 0.05_normal;
43 pave->width = 0.3_normal;
44 pave->height = 0.3_normal;
47 auto pave2 = canvas->Draw<
RPave>();
49 pave2->fill.style = RAttrFill::k3002;
50 pave2->corner = RPave::kBottomLeft;
51 pave2->offsetX = pave2->offsetY = 0.05_normal;
52 pave2->width = 0.3_normal;
53 pave2->height = 0.3_normal;
55 auto text = canvas->Draw<RPaveText>();
56 text->AddLine(
"This is RPaveText");
57 text->AddLine(
"It can have several lines");
58 text->AddLine(
"It should be in top right corner");
59 text->fill.color = RColor::kYellow;
60 text->fill.style = RAttrFill::k3003;
61 text->corner = RPave::kTopRight;
62 text->offsetX =
text->offsetY = 0.05_normal;
63 text->width = 0.4_normal;
64 text->height = 0.3_normal;
66 std::string fname = __FILE__;
67 auto pos = fname.find(
"rpave.cxx");
70 fname.append(
"comic.woff2");
72 fname =
"comic.woff2";
73 canvas->Draw<RFont>(
"CustomFont", fname);
75 auto text2 = canvas->Draw<RPaveText>();
76 text2->AddLine(
"RPaveText with custom font");
77 text2->AddLine(
"It loaded from comic.woff2 file");
78 text2->AddLine(
"One also can provide valid URL");
79 text2->fill.color = RColor::kGreen;
80 text2->fill.style = RAttrFill::k3004;
81 text2->corner = RPave::kBottomRight;
82 text2->offsetX = text2->offsetY = 0.05_normal;
83 text2->width = 0.4_normal;
84 text2->height = 0.3_normal;
85 text2->text.font.family =
"CustomFont";
87 canvas->SetSize(1000, 700);
Option_t Option_t TPoint TPoint const char text
RAttrValue< RColor > color
! fill color
Base class for paves with text, statistic, legends, placed relative to RFrame position and adjustable...
RAttrFill fill
! fill attributes
Namespace for ROOT features in testing.