#include "TPave.h"
#include "TLine.h"
void test() {
TLine *l = new TLine(0.3,0.3,0.5,0.5);
l->SetLineColor(kBlue);
l->Draw();
TPave *pave = new TPave(0.2,0.2,0.7,0.7,0);
pave->SetFillColorAlpha(kRed,0.5); //0.5 should be semi-transparent
pave->Draw();
}
The piece of code above does not show the blue line (that is behind the TPave) whereas I asked for the TPave be semi-transparent. Is SetFillColorAlpha working well?
The transparency is available on all platforms when the flag OpenGL.CanvasPreferGL is set to 1 in $ROOTSYS/etc/system.rootrc , or on Mac with the Cocoa backend. On the file output it is visible with PDF, PNG, Gif, JPEG, SVG … but not PostScript.