This ROOT 7 example demonstrates how to create a ROOT 7 canvas (RCanvas) and draw ROOT 7 lines in it (RLine).
It generates a set of lines using the "normal" coordinates' system and changing the line color linearly from black to red.
#include <ROOT/RLine.hxx>
{
auto canvas = RCanvas::Create("RLine example");
for (double i = 0; i < 360; i += 1) {
RColor col(50 + (
int)i / 360 * 200, 0, 0);
}
canvas->SetSize(900, 700);
if (canvas->SaveAs("line.png"))
printf(
"Store RCanvas in line.png\n");
canvas->Show();
}
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 angle
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
- 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
- Olivier Couet, Iliana Betsou
Definition in file rline.cxx.