16#include "ROOT/RText.hxx"
17#include "ROOT/RLine.hxx"
24 auto canvas = RCanvas::Create(
"Use RStyle for line styling");
27 for (
int i = 10; i > 0; i--) {
31 text->text.size = 0.04;
32 text->text.align = RAttrText::kRightCenter;
33 text->text.font = RAttrFont::kArialOblique;
36 line->SetId(std::string(
"obj") + std::to_string(i));
37 line->SetCssClass(std::string(
"user_class_") + std::to_string(i % 3));
40 auto style = std::make_shared<RStyle>();
42 style->AddBlock(
".user_class_1").AddInt(
"line_style", 4);
43 style->AddBlock(
".user_class_2").AddDouble(
"line_width", 5.);
44 style->AddBlock(
"#obj7").AddString(
"line_color",
"#0000FF");
46 style->AddBlock(
"line").AddString(
"line_color",
"red");
48 canvas->UseStyle(
style);
53 canvas->ClearOnClose(
style);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char text
A position (horizontal and vertical) in a RPad.