35 ::Error(
"grad",
"failed to create new custom colors");
40 const Color_t &radialFill = colorIndices[0];
41 const Color_t &linearFill = colorIndices[1];
42 const Color_t &transparentFill = colorIndices[2];
45 TCanvas *
const c =
new TCanvas(
"cpie",
"Gradient colours demo", 700, 700);
48 ::Error(
"gradients",
"This macro requires OS X and ROOT built with --enable-cocoa");
63 const Double_t locations[] = {0., 1.};
65 const Double_t rgbaData1[] = {0.2, 0.2, 0.2, 1.,
71 c->SetFillColor(linearFill);
75 TText *
const t =
new TText(0.05, 0.7,
"Can you see the text?");
81 TPad *
const pad =
new TPad(
"p",
"p", 0., 0., 1., 1.);
84 new TColor(transparentFill, 1., 1., 1.,
"transparent_fill_color", 0.);
91 const Double_t rgbaData2[] = { 1., 0.8, 0., 1.,
111 Double_t values[nSlices] = {0.8, 1.2, 1.2, 0.8, 1.};
112 Int_t colors[nSlices] = {radialFill, radialFill, radialFill, radialFill, radialFill};
114 TPie *
const pie =
new TPie(
"pie",
"TPie:", nSlices, values,
colors);
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
double Double_t
Double 8 bytes.
short Color_t
Color number (short).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
void SetCoordinateMode(ECoordinateMode mode)
Set coordinate mode.
void SetStartEnd(const Point &p1, const Point &p2)
Set end and start.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
The most important graphics class in the ROOT system.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
void Draw(Option_t *option="") override
Draw Pad in Current pad (re-parent pad if necessary).
void SetLabelsOffset(Float_t)
void SetEntryRadiusOffset(Int_t, Double_t)
void Draw(Option_t *option="l") override
Default Draw method for all objects.
void SetStartEndR1R2(const Point &p1, Double_t r1, const Point &p2, Double_t r2)
Set start and end R1 and R2.
unsigned FindFreeCustomColorIndices(Color_t(&indices)[N])