This macro demonstrate the text attributes for RText.
Angle, size and color are changed in a loop. The text alignment and the text font are fixed.
#include "ROOT/RText.hxx"
void rtext_angle()
{
auto canvas = RCanvas::Create("RText angle example");
auto draw = canvas->Draw<RText>(
RPadPos(0.5_normal, 0.6_normal),
"____ Hello World");
draw->text.size = 0.01 +
angle/5000.;
draw->text.angle =
angle;
draw->text.align = RAttrText::kLeftTop;
draw->text.font = RAttrFont::kArial;
}
canvas->Show();
}
Option_t Option_t TPoint TPoint angle
A position (horizontal and vertical) in a RPad.
- Date
- 2017-10-17
- Warning
- This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
- Author
- Olivier Couet Olivi.nosp@m.er.C.nosp@m.ouet@.nosp@m.cern.nosp@m..ch
Definition in file rtext_angle.cxx.