Draw a rectangle rotated at 45 degrees

Hi,

I have to draw a rectangle, rotated at 45 degrees with respect to the horizontal axis, on top of a 2D histogram. I have tried using TBox, TPad, TPave, but with no success when it came to the rotation part. I would be very grateful for any suggestions.

Thank you,

Best regards,
Adriana

Use should use a TPolyline. The Objects you are listing cannot be rotated.

Thank you for your reply. I was doing that, and I hoped it was not the only way. The problem I have is that it is hard to make sure that the angle is exactly 45 degrees and that the coordinates at the 4 corners of the rectangle are the right ones.

The reason I needed this was because I am plotting (2D histogram) the coordinates of the secondaries produced in a target experiment, and I wanted to superimpose the target rectangular geometry on the 2D histogram, to show where exactly the secondaries are produced. And the rectangular target is rotated at 45 degrees with respect to the beam.

But I will probably have to keep relying on TPolyline :neutral_face:

Thanks,

Adriana

If you do a conventional rotation your angle should be exactly 45 degrees. I do not see why it is hard to make sure they are 45 degrees.