Hello,
I’ve been trying to read through the class references in the hopes that I could find a way to use (partially) transparent colors in my plots. Looking at this constructor:
in ‘TColor.cxx’ I found the lines:
// fill color structure
SetRGB(r, g, b);
fAlpha = a;
which made me assume that ‘a’ was a floating point value representing an alpha channel going from 0 to 1. I did a little test as follows:
[code]TH1F * h_tall_gaus = new TH1F(“h_tall_gaus”, “”, 20, -2, 2)
TH1F * h_shortl_gaus = new TH1F(“h_short_gaus”, “”, 20, -2, 2)
h_tall_gaus->FillRandom(“gaus”, 1000)
h_short_gaus->FillRandom(“gaus”, 500)
TColor * tc_blue = new TColor(1001, 0, 0, 1, “”, .25)
TColor * tc_red = new TColor(1002, 1, 0, 0, “”, .25)
h_tall_gaus->SetFillColor(1001)
h_short_gaus->SetFillColor(1002)
h_tall_gaus->Draw()
h_short_gaus->Draw(“same”)[/code]
which resulted in what I would have expected if I had set the alpha channels to 1 instead of .25 (this also happens if I set them to 0).
Am I missing something here? I tried gStyle->SetCanvasPreferGL(1)
hoping that that might make a difference, but unfortunately not.