This ROOT 7 example shows the various line widths.
#include "ROOT/RText.hxx"
#include "ROOT/RLine.hxx"
void rline_width()
{
double num = 0.3;
for (int i = 10; i > 0; i--) {
num = num + 0.05;
auto text = canvas->Add<RText>(
RPadPos(.3_normal, 1_normal * num), std::to_string(i));
auto draw = canvas->Add<RLine>(
RPadPos(.32_normal, 1_normal * num),
RPadPos(.8_normal, 1_normal * num));
draw->line.width = i;
}
canvas->Show();
}
static std::shared_ptr< RCanvas > Create(const std::string &title)
Create new canvas instance.
A position (horizontal and vertical) in a RPad.
Namespace for ROOT features in testing.
- 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!
- Authors
- Iliana Betsou, Sergey Linev
Definition in file rline_width.cxx.