This ROOT 7 example shows the various line styles.
#include "ROOT/RText.hxx"
#include "ROOT/RLine.hxx"
void rline_style()
{
auto canvas = RCanvas::Create("Different RLine styles");
auto posy = 0.9_normal;
for (int i = 1; i <= 11; i++) {
std::string lbl;
if (i < 11)
lbl = std::to_string(i);
else
lbl = "Custom";
auto text = canvas->Add<RText>(
RPadPos{.3_normal, posy}, lbl);
text->text.align = RAttrText::kRightCenter;
text->text.font = RAttrFont::kArialOblique;
auto draw = canvas->Add<RLine>(
RPadPos{.32_normal, posy},
RPadPos{.8_normal, posy});
if (i < 11)
else
draw->line.pattern = "10,2,8,2,10,6,1,6";
posy -= 0.05_normal;
}
canvas->Show();
}
Option_t Option_t TPoint TPoint const char text
A position (horizontal and vertical) in a RPad.
- Date
- 2018-03-18
- Warning
- This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
- Author
- Iliana Betsou
Definition in file rline_style.cxx.