This macro is based on labels1.C by Rene Brun.
Updated by Timur Pocheptsov to use transparent text (12/10/2012). Requires OS X and ROOT configured with –enable-cocoa.
void transp_text()
{
::Error(
"transp_text",
"failed to create new custom colors");
return;
}
const Color_t grayColorIndex = indices[0], blackColorIndex = indices[1];
new TColor(grayColorIndex, 0.8, 0.8, 0.8,
"transparent_gray", 0.85);
new TColor(blackColorIndex, 0., 0., 0.,
"transparent_black", 0.5);
TCanvas *
const c1 =
new TCanvas(
"transparent text",
"transparent text demo", 10, 10, 900, 500);
::Warning(
"transt_text",
"You can see the transparency ONLY in a pdf or png output (\"File\"->\"Save As\" ->...)\n" "To have transparency in a canvas graphics, you need OS X version with cocoa enabled");
}
const char *people[nx] = {"Jean","Pierre","Marie","Odile",
"Sebastien","Fons","Rene","Nicolas","Xavier","Greg",
"Bjarne","Anton","Otto","Eddy","Peter","Pasha",
"Philippe","Suzanne","Jeff","Valery"};
TH1F *
const h =
new TH1F(
"h4",
"test", nx, 0, nx);
for (
Int_t i = 0; i < 5000; ++i)
for (
Int_t i = 1; i <= nx; ++i)
}
- Author
- Timur Pocheptsov
Definition in file transp_text.C.