24 Int_t indices[3] = {};
26 ::Error(
"transparentpad",
"failed to create new custom colors");
31 TCanvas *
const c1 =
new TCanvas(
"transparent pad",
"transparent pad demo", 10, 10, 900, 500);
34 ::Warning(
"transparentpad",
"You can see the transparency ONLY in a pdf or png output (\"File\"->\"Save As\" ->...)\n"
35 "To have transparency in a canvas graphics, you need OpenGL rendering enabled");
39 new TColor(indices[0], 1., 0.2, 0.2,
"transparent_pink", 0.25);
40 new TColor(indices[1], 0.2, 1., 0.2,
"transparent_green", 0.25);
41 new TColor(indices[2], 0.2, 2., 1.,
"transparent_blue", 0.15);
44 TH1F *
const h1 =
new TH1F(
"TH1F 1",
"TH1F 1", 100, -1.5, 1.5);
47 TH1F *
const h2 =
new TH1F(
"TH1F 2",
"TH1F 2", 100, -1.5, 0.);
50 TH1F *
const h3 =
new TH1F(
"TH1F 3",
"TH1F 3", 100, 0.5, 2.);
54 TPad *
const pad1 =
new TPad(
"transparent pad 1",
"transparent pad 1", 0.1, 0.1, 0.7, 0.7);
61 TPad *
const pad2 =
new TPad(
"transparent pad 2",
"transparent pad 2", 0.2, 0.2, 0.8, 0.8);
68 TPad *
const pad3 =
new TPad(
"transparent pad 3",
"transparent pad 3", 0.3, 0.3, 0.9, 0.9);
unsigned FindFreeCustomColorIndices(T(&indices)[N])
R__EXTERN TStyle * gStyle
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
1-D histogram with a float per channel (see TH1 documentation)}
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
void Error(const char *location, const char *msgfmt,...)
void SetCanvasPreferGL(Bool_t prefer=kTRUE)
virtual void FillRandom(const char *fname, Int_t ntimes=5000)
Fill histogram following distribution in function fname.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
The most important graphics class in the ROOT system.
void Warning(const char *location, const char *msgfmt,...)
The color creation and management class.