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

Detailed Description

#include "ROOT/RCanvas.hxx"
#include "ROOT/RText.hxx"
#include "ROOT/RLine.hxx"
void lineStyle()
{
using namespace ROOT::Experimental;
auto canvas = RCanvas::Create("Canvas Title");
double num = 0.3;
for (int i=10; i>0; i--){
num = num + 0.05;
canvas->Draw<RText>(std::to_string(i))->SetPos({.3_normal, 1_normal*num}).AttrText().SetSize(13).SetAlign(32).SetFont(52);
canvas->Draw<RLine>()->SetP1({.32_normal,1_normal*num}).SetP2({.8_normal, 1_normal*num}).AttrLine().SetStyle(i);
}
canvas->Show();
}
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 lineStyle.cxx.