Dear ROOTers,
I have used Root to analyse data for a few years already. Today I found a simple plotting problem for which I can’t find a solution online.
I’m trying to draw circles with “holes” on them. My aproach so far is trying to draw a TEllipse with a filling, but excluding parts of it.
The easiest way to put it is with an example. I’m trying to plot the following image (done with gimp) using ROOT:
The closest I get is this:
Using this code:
circle_with_holes.C (627 Bytes)
As you can see, I plotted a green background and defined the large gray-filled circle and tried to plot hollow circles as the holes, but I still get the gray filling of the large circle, instead of the green of the background. Of course I didn’t expect this to work, but I thought it could be a good starting point for my problem.
I thought it could be possible to get the desired result (1st picture) if inverse TEllipse objects and TEllipse intersections and unions could be defined. If so, I could define the area to fill in gray as the intersection of the large circle with the union of the inverse of the 2 small circles. I already looked at the TEllipse and TAttFill documentation pages, but didn’t found any function that could help. I also had a look at the image gallery and found no similar images.
Any suggestions?
Thank you.
Regards,
mapaz