Ellipse outline without a fill color

Question: I am drawing a circle using the following command:

TEllipse *circle3 = new TEllipse(1.4,1.4,1.27,1.27);

The circle looks fine with an outline in black, but I would like a transparent fill of the circle so that I can view events that make it in the circle. I’ve attached a plot that contains this circle on each panel. I would like to see the events that make it inside this circle.

Is there a remedy to my problem?



instead of SetFillColorAlpha.

Note the option “SAME” does not exist for TEllipse::Draw()

   auto c = new TCanvas();
   auto t = new TText(0.,1.,"text under the ellipse");
   TEllipse *circle = new TEllipse(1.4,1.4,1.27,1.27); // empty ellipse not hiding the text

Thanks for your replies. I tried using the circle->SetFillColor(0); line in my code, and I still end up with the same problem. I’ve attached the code to this message so that you can see how I implement the logic. If you would like the Root files as well, please let me know.

Thanks again,
hit_pos.C.txt (2.3 KB)

Oh, and by the way, I implemented your suggestions on the last few lines which would make the circle on the right-hand panel.

That’s not SetFillColor that’s SetFillStyle run my example. It works.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.