This macro requires OS X and ROOT compiled with –enable-cocoa to run.
Features:
- Radial and linear gradients
- Transparent/semitransparent colours.
- Shadows.
void gradients()
{
::Error(
"grad",
"failed to create new custom colors");
return;
}
const Color_t &radialFill = colorIndices[0];
const Color_t &linearFill = colorIndices[1];
const Color_t &transparentFill = colorIndices[2];
::Error(
"gradients",
"This macro requires OS X and ROOT built with --enable-cocoa");
return;
}
const Double_t rgbaData1[] = {0.2, 0.2, 0.2, 1.,
0.8, 1., 0.9, 1. };
TText *
const t =
new TText(0.05, 0.7,
"Can you see the text?");
TPad *
const pad =
new TPad(
"p",
"p", 0., 0., 1., 1.);
new TColor(transparentFill, 1., 1., 1.,
"transparent_fill_color", 0.);
const Double_t rgbaData2[] = {1., 0.8, 0., 1.,
1., 0.2, 0., 0.8};
locations, rgbaData2);
Double_t values[nSlices] = {0.8, 1.2, 1.2, 0.8, 1.};
Int_t colors[nSlices] = {radialFill, radialFill, radialFill,
radialFill, radialFill};
TPie *
const pie =
new TPie(
"pie",
"TPie:", nSlices, values, colors);
}
- Author
- Timur Pocheptsov
Definition in file gradients.C.