18#include "ROOT/RBox.hxx"
26 auto canvas = RCanvas::Create(
"RBox drawing");
28 auto box1 = canvas->Draw<RBox>(
RPadPos(0.1_normal, 0.3_normal),
RPadPos(0.3_normal,0.6_normal));
29 box1->border.color = RColor::kBlue;
30 box1->border.width = 5;
31 box1->fill.color =
RColor(0, 255, 0, 127);
32 box1->fill.style = RAttrFill::kSolid;
34 auto box2 = canvas->Draw<RBox>(
RPadPos(0.4_normal, 0.2_normal),
RPadPos(0.6_normal,0.7_normal));
35 box2->border.color = RColor::kRed;
36 box2->border.width = 10.f;
37 box2->border.style = RAttrLine::kDashed;
38 box2->fill.color =
RColor(0, 0, 255, 179);
39 box2->fill.style = RAttrFill::kSolid;
41 auto box3 = canvas->Draw<RBox>(
RPadPos(0.7_normal, 0.4_normal),
RPadPos(0.9_normal,0.6_normal));
42 box3->border.width = 3;
43 box3->fill.color = RColor::kBlue;
44 box3->fill.style = RAttrFill::kSolid;
46 auto box4 = canvas->Draw<RBox>(
RPadPos(0.7_normal, 0.7_normal),
RPadPos(0.9_normal,0.9_normal));
47 box4->border.width = 4;
49 auto box5 = canvas->Draw<RBox>(
RPadPos(0.7_normal, 0.1_normal),
RPadPos(0.9_normal,0.3_normal));
52 box5->border.width = 2;
A position (horizontal and vertical) in a RPad.