It generates a set of boxes using the "normal" coordinates' system.
#include "ROOT/RBox.hxx"
{
auto canvas = RCanvas::Create("RBox drawing");
auto box1 = canvas->Draw<RBox>(
RPadPos(0.1_normal, 0.3_normal),
RPadPos(0.3_normal,0.6_normal));
box1->border.color = RColor::kBlue;
box1->border.width = 5;
box1->fill.color =
RColor(0, 255, 0, 127);
box1->fill.style = RAttrFill::kSolid;
auto box2 = canvas->Draw<RBox>(
RPadPos(0.4_normal, 0.2_normal),
RPadPos(0.6_normal,0.7_normal));
box2->border.color = RColor::kRed;
box2->border.width = 10.f;
box2->border.style = RAttrLine::kDashed;
box2->fill.color =
RColor(0, 0, 255, 179);
box2->fill.style = RAttrFill::kSolid;
auto box3 = canvas->Draw<RBox>(
RPadPos(0.7_normal, 0.4_normal),
RPadPos(0.9_normal,0.6_normal));
box3->border.width = 3;
box3->fill.color = RColor::kBlue;
box3->fill.style = RAttrFill::kSolid;
auto box4 = canvas->Draw<RBox>(
RPadPos(0.7_normal, 0.7_normal),
RPadPos(0.9_normal,0.9_normal));
box4->border.width = 4;
auto box5 = canvas->Draw<RBox>(
RPadPos(0.7_normal, 0.1_normal),
RPadPos(0.9_normal,0.3_normal));
box5->border.rx = 10;
box5->border.ry = 10;
box5->border.width = 2;
canvas->Show();
}
A position (horizontal and vertical) in a RPad.