Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
rline_width.cxx File Reference

Detailed Description

This ROOT 7 example shows the various line widths.

#include "ROOT/RCanvas.hxx"
#include "ROOT/RText.hxx"
#include "ROOT/RLine.hxx"
void rline_width()
{
using namespace ROOT::Experimental;
auto canvas = RCanvas::Create("Different line widths");
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));
text->text.size = 0.04;
text->text.align = RAttrText::kRightCenter;
text->text.font = RAttrFont::kArialOblique;
auto draw = canvas->Add<RLine>(RPadPos(.32_normal, 1_normal*num), RPadPos(.8_normal, 1_normal*num));
draw->line.width = i;
}
canvas->Show();
}
A position (horizontal and vertical) in a RPad.
Definition RPadPos.hxx:28
TText * text
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.