25#include "ROOT/RPaveText.hxx"
26#include "ROOT/RFont.hxx"
36 auto pave = canvas->Draw<
RPave>();
40 pave->border.width = 3;
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>();
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");
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");
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);
RAttrValue< RColor > color
! fill color
static std::shared_ptr< RCanvas > Create(const std::string &title)
Create new canvas instance.
static R__DLLEXPORT constexpr RGB_t kRed
static R__DLLEXPORT constexpr RGB_t kYellow
static R__DLLEXPORT constexpr RGB_t kGreen
static R__DLLEXPORT constexpr RGB_t kBlue
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.