Image in ROOT in cm scale

Hi,

I am trying with this example,

root.cern.ch/root/html/tutorial … pad.C.html

But I want that show me position of the cursor in cm, really I want to push two position and gave me the distance of this two points in centimiters.

Best

Nicolas

This example:

root.cern/doc/master/img2pad_8C.html

does not deal with cursor position nor does some user interaction… It simply displays an image in a Pad applying various transformations. I am not sur to fully understand your request …

Hi,

Yes, I want to do that, to open an image as that example, and the when doing a click wht the curso, show me in the console that position, and when I click again shoe me the position and the distance in centimiters between that points.

Best

Nicolás
img2pad.C (1.51 KB)

if you do:

c1->ToggleEventStatus();

you will see the position at the bottom of the canvas

The following example can also help
root.cern.ch/how/how-let-graphi … ouse-click

Many Thanks!

Nicolas