18#include "ROOT/RColor.hxx"
19#include "ROOT/RLine.hxx"
28 auto canvas = RCanvas::Create(
"Canvas Title");
30 for (
double i = 0; i < 360; i+=1) {
34 auto opts = canvas->Draw(RLine({0.5_normal, 0.5_normal} , p));
35 RColor col(0.0025*i, 0, 0);
36 opts->SetLineColor(col);
39 canvas->Draw(RLine({0.0_normal, 0.0_normal}, {1.0_normal,1.0_normal}));
40 canvas->Draw(RLine({0.1_normal, 0.1_normal}, {0.9_normal,0.1_normal}));
41 canvas->Draw(RLine({0.9_normal, 0.1_normal}, {0.9_normal,0.9_normal}));
42 canvas->Draw(RLine({0.9_normal, 0.9_normal}, {0.1_normal,0.9_normal}));
43 canvas->Draw(RLine({0.1_normal, 0.1_normal}, {0.1_normal,0.9_normal}));
44 canvas->Draw(RLine({0.0_normal, 1.0_normal}, {1.0_normal,0.0_normal}));
47 canvas->SaveAs(
"line.png");
A position (horizontal and vertical) in a RPad.