ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to get the cursorposition over image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

BionicWave

Germany
33 Posts

Posted - Mar 08 2012 :  05:24:32  Show Profile  Reply
I use an TImageEnView.
When i set the image to be centered inside imageview i would like to get cursor x,y in relation to the beginning of the image, not the beginning of imageenview.
Which parameter can i use to substract the distance of
imageenview.left / top
and
imageenview.iebitmap.left / top

I hope you understand of what i´m speaking of.

BionicWave

Germany
33 Posts

Posted - Mar 08 2012 :  05:53:07  Show Profile  Reply
Found it !!
Its the vector of the x / y-position minus renderrectangle xDst / yDst.

Go to Top of Page

fab

1310 Posts

Posted - Mar 08 2012 :  07:26:48  Show Profile  Reply
You can also use XScr2Bmp and YScr2Bmp, which take care of zoom and pan:

BitmapX := ImageEnView.XScr2Bmp(componentX);
BitmapY := ImageEnView.YScr2Bmp(componentY);
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: