18void triangles(
int ntriangles = 50)
20 auto c1 =
new TCanvas(
"c1",
"triangles", 10, 10, 700, 700);
27 for (
int i = 0; i < ntriangles; i++) {
28 x[0] =
r.Uniform(.05, .95);
29 y[0] =
r.Uniform(.05, .95);
38 int ci = ncolors *
r.Rndm();
40 c->SetAlpha(
r.Rndm());
41 pl->SetFillColor(
c->GetNumber());
44 c1->AddExec(
"ex",
"TriangleClicked()");
52 int event =
gPad->GetEvent();
virtual Color_t GetFillColor() const
Return the fill area color.
static Int_t GetNumberOfColors()
static Int_t GetColorPalette(Int_t i)
Mother of all ROOT objects.
virtual UInt_t GetUniqueID() const
Return the unique object id.
This is the base class for the ROOT Random number generators.