diff --git a/core/base/src/TAttFill.cxx b/core/base/src/TAttFill.cxx index 4f418792202e2..6ac8381d2668e 100644 --- a/core/base/src/TAttFill.cxx +++ b/core/base/src/TAttFill.cxx @@ -258,7 +258,7 @@ void TAttFill::SetFillAttributes() /// Set a transparent fill color. /// \param fcolor defines the fill color /// \param falpha defines the percentage of opacity from 0. (fully transparent) to 1. (fully opaque). -/// \note falpha is ignored (treated as 1) if the TCanvas has no GL support activated. +/// \note falpha is used only on the [supported platforms](\ref col_trans_available). void TAttFill::SetFillColorAlpha(Color_t fcolor, Float_t falpha) { diff --git a/core/base/src/TAttLine.cxx b/core/base/src/TAttLine.cxx index e001ca4ac20c8..6c8e074c83a2c 100644 --- a/core/base/src/TAttLine.cxx +++ b/core/base/src/TAttLine.cxx @@ -312,7 +312,7 @@ void TAttLine::SetLineAttributes() /// Set a transparent line color. /// \param lcolor defines the line color /// \param lalpha defines the percentage of opacity from 0. (fully transparent) to 1. (fully opaque). -/// \note lalpha is ignored (treated as 1) if the TCanvas has no GL support activated. +/// \note lalpha is used only on the [supported platforms](\ref col_trans_available). void TAttLine::SetLineColorAlpha(Color_t lcolor, Float_t lalpha) { diff --git a/core/base/src/TAttMarker.cxx b/core/base/src/TAttMarker.cxx index 1a9c1a6b89e53..31224a83ee466 100644 --- a/core/base/src/TAttMarker.cxx +++ b/core/base/src/TAttMarker.cxx @@ -359,7 +359,7 @@ void TAttMarker::SetMarkerAttributes() /// Set a transparent marker color. /// \param mcolor defines the marker color /// \param malpha defines the percentage of opacity from 0. (fully transparent) to 1. (fully opaque). -/// \note malpha is ignored (treated as 1) if the TCanvas has no GL support activated. +/// \note malpha is used only on the [supported platforms](\ref col_trans_available). void TAttMarker::SetMarkerColorAlpha(Color_t mcolor, Float_t malpha) { diff --git a/core/base/src/TAttText.cxx b/core/base/src/TAttText.cxx index 892537a9d0f2e..d5bbc07fe8234 100644 --- a/core/base/src/TAttText.cxx +++ b/core/base/src/TAttText.cxx @@ -426,7 +426,7 @@ void TAttText::SetTextAttributes() /// Set a transparent text color. /// \param tcolor defines the text color /// \param talpha defines the percentage of opacity from 0. (fully transparent) to 1. (fully opaque). -/// \note talpha is ignored (treated as 1) if the TCanvas has no GL support activated. +/// \note talpha is used only on the [supported platforms](\ref col_trans_available). void TAttText::SetTextColorAlpha(Color_t tcolor, Float_t talpha) { diff --git a/core/base/src/TColor.cxx b/core/base/src/TColor.cxx index 86dc1d3f58827..14c5b2246aafe 100644 --- a/core/base/src/TColor.cxx +++ b/core/base/src/TColor.cxx @@ -1046,9 +1046,22 @@ is set to blue with an opacity of 35% (i.e. a transparency of 65%). histo->SetFillColorAlpha(kBlue, 0.35); ~~~ -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, TeX ... but not PostScript. +\anchor col_trans_available + +#### Note: + +Transparency is supported by the following graphics backends: + +- OpenGL +- Cocoa/Quartz (macOS) +- SVG +- PDF +- TeX +- PNG, GIF, and JPEG +- TWebCanvas +- Future `TCanvasImp` implementations, such as `qt6canvas` + +Transparency is **not** supported by the X11 and PostScript backends. Alternatively, you can call at the top of your script `gStyle->SetCanvasPreferGL();`. Or if you prefer to activate GL for a single canvas `c`, then use `c->SetSupportGL(true);`.