How to draw (rotated) transparent rectangles in a TPad?

Hello,
I need to draw three arrays of strips one behind to each other and rotated a certain angle respect to the previous one. Each strip is colored depending on the energy a particle deposit in it (the strips represent scintillators).
I would like to fill the strips with a transparent pattern in such a way I can see properly the strips behind. For the moment, I have implemented this “viewer” using TLine’s, which don’t allow for this kind of transparent patterns (see the attached plot). I could have used TBox’s instead, but (as far as I know) they can not be rotated…
Do you have any suggestion to properly solve this issue?

Thanks!


Use TPolyLine and draw it is option “f” to paint it as a filled polygon:

   TPolyLine *l2 = new TPolyLine(nf+1,xf,yf);
   l2->SetFillStyle(3002);
   l2->SetFillColor(2);
   l2->Draw("f");

root.cern.ch/root/html/TPolyLine.html

the available fill patterns are shown here:
root.cern.ch/root/html/TAttFill.html#F2

Thank you!
I have re-implemented the viewer with TPolyLine’s and using different fill patterns. However the result is not the desired one. Patterns of the same type cover to each other. Is there any method to fill the lines with a really transparent color?


you should choose less cluttered patterns, like hatches. So they can overlap and keep the image clear.

Is not possible to draw these TPolyLines with “line” and “fill” options at the same time? I mean, with a border and a fill pattern.

No.