31 ::Error(
"grad",
"failed to create new custom colors");
36 const Color_t &radialFill = colorIndices[0];
37 const Color_t &linearFill = colorIndices[1];
38 const Color_t &transparentFill = colorIndices[2];
41 TCanvas *
const c =
new TCanvas(
"cpie",
"Gradient colours demo", 700, 700);
44 ::Error(
"gradients",
"This macro requires OS X and ROOT built with --enable-cocoa");
60 const Double_t locations[] = {0., 1.};
62 const Double_t rgbaData1[] = {0.2, 0.2, 0.2, 1.,
72 TText *
const t =
new TText(0.05, 0.7,
"Can you see the text?");
78 TPad *
const pad =
new TPad(
"p",
"p", 0., 0., 1., 1.);
81 new TColor(transparentFill, 1., 1., 1.,
"transparent_fill_color", 0.);
88 const Double_t rgbaData2[] = {1., 0.8, 0., 1.,
99 locations, rgbaData2);
111 Int_t colors[nSlices] = {radialFill, radialFill, radialFill,
112 radialFill, radialFill};
114 TPie *
const pie =
new TPie(
"pie",
"TPie:", nSlices, values, colors);
unsigned FindFreeCustomColorIndices(Color_t(&indices)[N])
std::vector< double > values
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Define a radial color gradient.
void SetStartEndR1R2(const Point &p1, Double_t r1, const Point &p2, Double_t r2)
Set start and end R1 and R2.
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
void SetEntryRadiusOffset(Int_t, Double_t)
Set the distance, in the direction of the radius of the slice.
void SetCoordinateMode(ECoordinateMode mode)
Set coordinate mode.
Base class for several text objects.
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
void Error(const char *location, const char *msgfmt,...)
virtual void SetFillColor(Color_t fcolor)
The most important graphics class in the ROOT system.
Define a linear color gradient.
void SetRadius(Double_t)
Set the pie chart's radius' value.
The color creation and management class.
void SetLabelsOffset(Float_t)
Set the distance between the label end the external line of the TPie.
void SetStartEnd(const Point &p1, const Point &p2)
Set end and start.
virtual void Draw(Option_t *option="l")
Draw the pie chart.